webservices/wsconnection/src/senserviceconnectionimpl.cpp
changeset 29 5743aa3a72c3
parent 28 0802db42e4e9
--- a/webservices/wsconnection/src/senserviceconnectionimpl.cpp	Sun May 30 23:54:06 2010 +0530
+++ b/webservices/wsconnection/src/senserviceconnectionimpl.cpp	Thu Jul 08 14:00:07 2010 +0530
@@ -621,6 +621,7 @@
             TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"SubmitL - ESenInternalError");
             retVal = KErrSenInternal;
             }
+            break;
         default:
             {
             TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"SubmitL - default");
@@ -2511,16 +2512,19 @@
     		}
     	else
         	{
-    	TMessage message = ipSenServiceDispatcher->GetMessageFromQueue(aTransactionID);
-    	CSenAsyncOperation* pAsyncOp = message.iSenAsyncOperation;
-    	if (pAsyncOp)
-    	    {
-            TInt idx = AsyncOpsArrayL().Find(pAsyncOp);    
-            if (idx >= 0)
-                {
-                AsyncOpsArrayL().Remove(idx);
-                }
-    	    pAsyncOp->iActive = NULL;
+	    	TMessage message = ipSenServiceDispatcher->GetMessageFromQueue(aTransactionID);
+	    	CSenAsyncOperation* pAsyncOp = message.iSenAsyncOperation;
+	    	if (pAsyncOp)
+	    	    {
+	            TInt idx(-1);
+	            TRAP( retVal,
+					idx = AsyncOpsArrayL().Find(pAsyncOp);
+		            if (idx >= 0)
+		                {
+		                AsyncOpsArrayL().Remove(idx);
+		                }
+				  );
+	    	    pAsyncOp->iActive = NULL;
     	    
     	    pAsyncOp->Cancel();
             delete pAsyncOp;