telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmcalltsy.cpp
changeset 69 b982c3e940f3
parent 44 8b72faa1200f
child 73 70d75957b98f
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmcalltsy.cpp	Mon Aug 09 17:43:08 2010 +0100
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmcalltsy.cpp	Tue Sep 14 17:55:14 2010 +0100
@@ -343,26 +343,27 @@
         if ( trapError != KErrNone )
             {
             //error handling. Object cannot be created. 
+			//reset request handle to indicate the request is no longer ongoing
+            iTsyReqHandleStore->FindAndResetTsyReqHandle(aTsyReqHandle);
             ReqCompleted( aTsyReqHandle, trapError );
             }
         else if ( ret != KErrNone )
             {
             ReqCompleted( aTsyReqHandle, ret );
             }   
-        //save request handle
-        if ( EMultimodeCallReqHandleUnknown != iReqHandleType )
+        else if ( EMultimodeCallReqHandleUnknown != iReqHandleType )
             {
+            //save request handle
 #ifdef REQHANDLE_TIMER
             SetTypeOfResponse( iReqHandleType, aTsyReqHandle );
 #else
             iTsyReqHandleStore->SetTsyReqHandle(
                 iReqHandleType, aTsyReqHandle );
 #endif
-            // We've finished with this value now. Clear it so it doesn't leak
-            //  up to any other instances of this method down the call stack
-            iReqHandleType = EMultimodeCallReqHandleUnknown;
             }
-    
+        // We've finished with this value now. Clear it so it doesn't leak
+        //  up to any other instances of this method down the call stack
+        iReqHandleType = EMultimodeCallReqHandleUnknown;
         }
 
     return KErrNone;