applayerprotocols/httptransportfw/core/CTransaction.cpp
changeset 23 ea9c9681bbaf
parent 0 b16258d2340f
child 28 dd1f62411ef8
--- a/applayerprotocols/httptransportfw/core/CTransaction.cpp	Thu May 27 13:21:53 2010 +0300
+++ b/applayerprotocols/httptransportfw/core/CTransaction.cpp	Fri Jun 11 14:06:05 2010 +0300
@@ -38,10 +38,13 @@
 	{
 	// Delete all current events.
 	iEventQueue.Reset();
-	// Cancel the active object
-	Cancel();
-	// And send the cancel event
-	SynchronousSendEvent(THTTPEvent::ECancel, THTTPEvent::EOutgoing, aStart);
+	if(iStatus != ECancelled)
+		{
+		// Cancel the active object
+		Cancel();
+		// And send the cancel event
+		SynchronousSendEvent(THTTPEvent::ECancel, THTTPEvent::EOutgoing, aStart);
+		}
 	if (iStatus != EInFilter && iStatus != ECancelled)
 		iStatus = EPassive;
 	else
@@ -58,6 +61,7 @@
 		{
 		CHeaderFieldPart::ClosePropertySet(iPropertySet);
 		delete iRequest;
+		iRequest = NULL;
 		delete this;
 		return;
 		}
@@ -81,7 +85,9 @@
 	iSession.RemoveTransaction(this);
 	CHeaderFieldPart::ClosePropertySet(iPropertySet);
 	delete iRequest;
+	iRequest = NULL;
 	delete iResponse;
+	iResponse = NULL;
 
 	// Cancel the active object
 	Cancel();