[simias-svn] SF.net SVN: simias:[7473] branches/iFolder_3.8.2_beta/src/core/ CollectionStore/Member
Brought to you by:
srinidhi_bs
|
From: <mv...@us...> - 2010-08-24 13:18:01
|
Revision: 7473
http://simias.svn.sourceforge.net/simias/?rev=7473&view=rev
Author: mvikash
Date: 2010-08-24 13:17:54 +0000 (Tue, 24 Aug 2010)
Log Message:
-----------
changes are done to add message for unsupported option and for server
unavailablity.
Modified Paths:
--------------
branches/iFolder_3.8.2_beta/src/core/CollectionStore/Member.cs
Modified: branches/iFolder_3.8.2_beta/src/core/CollectionStore/Member.cs
===================================================================
--- branches/iFolder_3.8.2_beta/src/core/CollectionStore/Member.cs 2010-08-20 13:18:14 UTC (rev 7472)
+++ branches/iFolder_3.8.2_beta/src/core/CollectionStore/Member.cs 2010-08-24 13:17:54 UTC (rev 7473)
@@ -1587,7 +1587,8 @@
/// Change the password for this member, It will be called by thick client and will be running on simias client
/// </summary>
public int ChangePassword(string OldPassword, string NewPassword)
- {
+ {
+ int retValue = 0;
Store store = Store.GetStore();
string DomainID = this.GetDomainID(store);
@@ -1601,10 +1602,19 @@
svc.Url = host.PublicUrl;
smConn.Authenticate ();
- smConn.InitializeWebClient(svc, "DomainService.asmx");
-
- return( svc.ChangePasswordOnServer(DomainID, UserID, OldPassword, NewPassword)) ;
-
+ smConn.InitializeWebClient(svc, "DomainService.asmx");
+ try
+ {
+ retValue = svc.ChangePasswordOnServer(DomainID, UserID, OldPassword, NewPassword);
+ }
+ catch (Exception ex)
+ {
+ if (ex.Message.IndexOf("Unable to connect") != -1)
+ {
+ retValue = 9; //Server unavailable
+ }
+ }
+ return retValue;
}
@@ -2337,7 +2347,10 @@
catch(Exception ex)
{
log.Debug("ValidatePassPhrase : {0} and return value is :{1}", ex.Message, Simias.Authentication.StatusCodes.PassPhraseInvalid.ToString());
- return Simias.Authentication.StatusCodes.PassPhraseInvalid;
+ if(ex.Message.IndexOf("Unable to connect") != -1)
+ return Simias.Authentication.StatusCodes.ServerUnAvailable;
+ else
+ return Simias.Authentication.StatusCodes.PassPhraseInvalid;
//throw ex;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|