email/pop3andsmtpmtm/popservermtm/src/POPSMTM.CPP
changeset 52 12db4185673b
parent 0 72b543305e3a
child 58 5401a102f08b
child 60 7fdbb852d323
equal deleted inserted replaced
44:36f374c67aa8 52:12db4185673b
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
  1430 			}
  1430 			}
  1431 		if(!(iState.iLastCurrentOperation == EPopConnectedAndIdle && iState.iCurrentOperation == EPopDisconnected) ) 
  1431 		if(!(iState.iLastCurrentOperation == EPopConnectedAndIdle && iState.iCurrentOperation == EPopDisconnected) ) 
  1432 			{	
  1432 			{	
  1433 			CommandComplete( eCode );
  1433 			CommandComplete( eCode );
  1434 			}
  1434 			}
       
  1435 		else if(iState.iLastCurrentOperation == EPopConnectedAndIdle && iState.iCurrentOperation == EPopDisconnected && eCode != KErrNone)
       
  1436 		    {
       
  1437             // Some email servers doesn’t wait for QUIT command, in such cases need to close RConnection
       
  1438             delete iSessionManager; 
       
  1439             iSessionManager = NULL;
       
  1440 			
       
  1441             iPopProgress.iErrorCode = eCode;
       
  1442 		    }
  1435 		else
  1443 		else
  1436 			{
  1444 			{
  1437 			iPopProgress.iErrorCode = eCode;
  1445 			iPopProgress.iErrorCode = eCode;
  1438 			}
  1446 			}
  1439 		iServerEntry->SetEntry(KMsvNullIndexEntryId); // when it times out the server MTM doesn't get deleted and henc the iServerEntry is locked and cannot do anythig withit.  If you set it to NULL it will solve the problem
  1447 		iServerEntry->SetEntry(KMsvNullIndexEntryId); // when it times out the server MTM doesn't get deleted and henc the iServerEntry is locked and cannot do anythig withit.  If you set it to NULL it will solve the problem