diff -r 5253a20d2a1e -r a4d6f1ea0416 ipsservices/ipssosplugin/src/ipsplgimap4connectop.cpp --- a/ipsservices/ipssosplugin/src/ipsplgimap4connectop.cpp Mon Jan 18 20:08:26 2010 +0200 +++ b/ipsservices/ipssosplugin/src/ipsplgimap4connectop.cpp Tue Jan 26 11:45:42 2010 +0200 @@ -88,7 +88,8 @@ aSignallingAllowed ), iDoPlainConnect( aDoPlainConnect ), iEventHandler( aEventHandler ), - iIsSyncStartedSignaled( EFalse ) + iIsSyncStartedSignaled( EFalse ), + iAlreadyConnected( EFalse ) { FUNC_LOG; iService = aService; @@ -125,10 +126,20 @@ User::Panic( KIpsPlgIpsConnPanic, KErrNotSupported ); } - iState = EStateStartConnect; - iStatus = KRequestPending; - SetActive(); - CompleteThis(); + if ( tentry.Connected() ) + { + iState = EStateCompleted; + iAlreadyConnected = ETrue; + SetActive(); + CompleteThis(); + } + else + { + iState = EStateStartConnect; + iStatus = KRequestPending; + SetActive(); + CompleteThis(); + } } // ---------------------------------------------------------------------------- @@ -521,6 +532,13 @@ // /*TInt CIpsPlgImap4ConnectOp::GetOperationErrorCodeL( ) { + if ( iAlreadyConnected ) + { + // Connected state was set in CIpsPlgPop3ConnectOp::ConstructL() + // so iOperation is null + return KErrNone; + } + if ( !iOperation ) { return KErrNotFound;