telephonyserverplugins/common_tsy/commontsy/src/mmpacket/Cmmpacketservicetsy.cpp
changeset 69 b982c3e940f3
parent 44 8b72faa1200f
child 73 70d75957b98f
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmpacket/Cmmpacketservicetsy.cpp	Mon Aug 09 17:43:08 2010 +0100
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmpacket/Cmmpacketservicetsy.cpp	Tue Sep 14 17:55:14 2010 +0100
@@ -1989,14 +1989,15 @@
 
     if ( KErrNone != trapError )
         {
+		//reset request handle to indicate the request is no longer ongoing
+        iTsyReqHandleStore->FindAndResetTsyReqHandle(aTsyReqHandle);
         CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, trapError );
         }
     else if ( KErrNone != ret )
         {
         CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, ret );
         }
-
-    if ( EMultimodePacketServiceReqHandleUnknown != iReqHandleType )
+    else if ( EMultimodePacketServiceReqHandleUnknown != iReqHandleType )
         {
         // Save request handle type
 
@@ -2005,11 +2006,10 @@
 #else
         iTsyReqHandleStore->SetTsyReqHandle( iReqHandleType, iTsyReqHandle );
 #endif // REQHANDLE_TIMER
-        // 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 = EMultimodePacketServiceReqHandleUnknown;
         }
-
+    // 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 = EMultimodePacketServiceReqHandleUnknown;
     return KErrNone;
     }
 
@@ -4112,5 +4112,16 @@
     return iMaxActiveServices;
     }
 
+    
+//-----------------------------------------------------------------------------
+// TBool CMmPacketServiceTsy::ResetReqHandle
+// Resets request handle in the req handle store
+//-----------------------------------------------------------------------------
+// 
+TBool CMmPacketServiceTsy::ResetReqHandle( const TTsyReqHandle aTsyReqHandle )
+    {
+    return iTsyReqHandleStore->FindAndResetTsyReqHandle( aTsyReqHandle );
+    }
+
 //  End of File