[simias-svn] SF.net SVN: simias:[7623] trunk/src/core/Domain/DomainAgent.cs
Brought to you by:
srinidhi_bs
|
From: <he...@us...> - 2012-04-16 11:15:57
|
Revision: 7623
http://simias.svn.sourceforge.net/simias/?rev=7623&view=rev
Author: hegdegg
Date: 2012-04-16 11:15:51 +0000 (Mon, 16 Apr 2012)
Log Message:
-----------
ID:#727008
Reviewer: Vikash
Localization Required: No
Documentation Required: Yes
Description: Client will not support old server (before 3.8.0.2)be default, to support old server, add registry entry "SupportOldServer"
Modified Paths:
--------------
trunk/src/core/Domain/DomainAgent.cs
Modified: trunk/src/core/Domain/DomainAgent.cs
===================================================================
--- trunk/src/core/Domain/DomainAgent.cs 2012-04-11 11:33:58 UTC (rev 7622)
+++ trunk/src/core/Domain/DomainAgent.cs 2012-04-16 11:15:51 UTC (rev 7623)
@@ -482,6 +482,12 @@
/// <returns>
/// The Domain ID of the newly attached Domain
/// </returns>
+ public static int isOldServerLoginNeeded()
+ {
+ RegistryKey regKey = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Novell\iFolder");
+ int status = (int) regKey.GetValue("SupportOldServer", 0) ;
+ return status;
+ }
public Simias.Authentication.Status Attach(string host, string user, string password)
{
CookieContainer cookies = new CookieContainer();
@@ -624,8 +630,10 @@
// If a new client is connecting to an old server, then auth will fail as creds
// are encoded. Hence we try once more without encoding the creds.
log.Debug("This might be old server 3.8.0.2 with no multi byte support, trying once more with out encoding the creds");
- status = this.Login( new Uri( baseUrl ), domainID, myOldCred, false );
- if ( status.statusCode == SCodes.Success || status.statusCode == SCodes.SuccessInGrace )
+ int loginToOldServer = isOldServerLoginNeeded();
+ if (loginToOldServer == 1) //supprot old server
+ status = this.Login( new Uri( baseUrl ), domainID, myOldCred, false );
+ if ( status.statusCode == SCodes.Success || status.statusCode == SCodes.SuccessInGrace )
oldServer = true;
else
return status;
@@ -974,8 +982,11 @@
// If a new client is connecting to an old server, then auth will fail as creds
// are encoded. Hence we try once more without encoding the creds.
log.Debug("possibly server is 3.8.0.2 not supporting multi byte,trying again without encoding creds ");
- status = this.Login( tempUri.Uri, DomainID, myOldCred, false);
- if ( status.statusCode == SCodes.Success || status.statusCode == SCodes.SuccessInGrace )
+ int loginToOldServer = isOldServerLoginNeeded();
+ if (loginToOldServer == 1)
+ status = this.Login( tempUri.Uri, DomainID, myOldCred, false);
+
+ if ( status.statusCode == SCodes.Success || status.statusCode == SCodes.SuccessInGrace )
{
oldServer = true;
BasicCredentials basic =
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|