email/imap4mtm/imapsession/src/cimapfetchbody.cpp
branchRCL_3
changeset 26 ebe688cedc25
parent 0 72b543305e3a
child 27 7fdbb852d323
--- a/email/imap4mtm/imapsession/src/cimapfetchbody.cpp	Thu Aug 19 09:51:11 2010 +0300
+++ b/email/imap4mtm/imapsession/src/cimapfetchbody.cpp	Tue Aug 31 15:11:31 2010 +0300
@@ -66,7 +66,8 @@
 	iImapMailStore(aImapMailStore),
 	iParent(aParent),
 	iFetchBodyResponse(aFetchBodyResponse),
-	iSendFetch(ETrue)
+	iSendFetch(ETrue),
+	iCancelled(EFalse)
 	{
 	}
 	
@@ -86,7 +87,7 @@
 void CImapFetchBody::Cancel()
 	{
 	__LOG_TEXT(iLogId, "CImapFetchBody::Cancel()"); // Overrides CImapCommand::Cancel()
-	
+	iCancelled = ETrue;
 	iImapMailStore.CancelRequest(*this);
 	CImapCommand::Cancel();
 	}
@@ -226,6 +227,10 @@
 	{	
 	iOutStream=&aStream;
 	
+	if(iCancelled)
+	{
+	   return; 
+	}
 #if (defined SYMBIAN_EMAIL_CAPABILITY_SUPPORT)		
 	// check for BINARY capability
 	const CImapCapabilityInfo& capabilityInfo = iParent.CapabilityInfo();