--- a/omadmadapters/syncmldm12/src/NSmlDmSettingsAdapter12.cpp Wed Aug 18 09:39:31 2010 +0300
+++ b/omadmadapters/syncmldm12/src/NSmlDmSettingsAdapter12.cpp Thu Sep 02 20:16:47 2010 +0300
@@ -2950,37 +2950,47 @@
break;
case ( ETransportAuthName ):
{
- OpenSyncSessionAndProfileL( aLUID, ESmlOpenReadWrite );
- TInt mediumType = ENone;
- GetProfileConnectiontypeL( mediumType );
+ TInt retVal = OpenSyncSessionAndProfileL( aLUID, ESmlOpenReadWrite );
+ if( retVal != KErrNone )
+ {
+ iCurrentProfile = 0;
+ iProfile.Close();
+ _DBG_FILE( "CNSmlDMSettingsAdapter12::SetDMFieldDataL(): end" );
+ return retVal;
+ }
+
+ TInt mediumType = ENone;
+ GetProfileConnectiontypeL( mediumType );
if( mediumType == EHttp)
{
rValue = SetProfileHttpUserNameL ( aLUID, aObject );
- }
- else if(mediumType == EObex)
- {
- rValue = KErrNone;
-
- }
-
-
- //break;
+ }
+ else if(mediumType == EObex)
+ {
+ rValue = KErrNone;
+ }
}
break;
case ( EProfileTransportPassword ):
{
- TInt mediumType = ENone;
- OpenSyncSessionAndProfileL( aLUID, ESmlOpenReadWrite );
- GetProfileConnectiontypeL( mediumType );
+ TInt mediumType = ENone;
+ TInt retVal = OpenSyncSessionAndProfileL( aLUID, ESmlOpenReadWrite );
+ if( retVal != KErrNone )
+ {
+ iCurrentProfile = 0;
+ iProfile.Close();
+ _DBG_FILE( "CNSmlDMSettingsAdapter12::SetDMFieldDataL(): end" );
+ return retVal;
+ }
+ GetProfileConnectiontypeL( mediumType );
if( mediumType == EHttp)
{
rValue = SetProfileHttpPasswordL ( aLUID, aObject );
- }
- else if(mediumType == EObex)
- {
- rValue = KErrNone;
-
- }
+ }
+ else if(mediumType == EObex)
+ {
+ rValue = KErrNone;
+ }
}
break;
case (EProfileTransportAuthData) :