telephonyserverplugins/common_tsy/commontsy/src/mmsms/cmmsmsstoragetsy.cpp
branchRCL_3
changeset 74 9200f38b1324
parent 66 07a122eea281
child 82 042fd2753b8f
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmsms/cmmsmsstoragetsy.cpp	Tue Sep 14 23:33:57 2010 +0300
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmsms/cmmsmsstoragetsy.cpp	Wed Sep 15 13:30:43 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -155,23 +155,24 @@
 
             if ( KErrNone != leaveCode )
                 {
-                ReqCompleted( aTsyReqHandle, leaveCode );
+				//reset request handle to indicate the request is no longer ongoing
+                iMmTsyReqHandleStore->FindAndResetTsyReqHandle( aTsyReqHandle );
+				ReqCompleted( aTsyReqHandle, leaveCode );
                 }
-
-            // save request handle
-            if ( CMmSmsTsy::EMultimodeSmsReqHandleUnknown != iReqHandleType )
+            else if ( CMmSmsTsy::EMultimodeSmsReqHandleUnknown != iReqHandleType )
                 {
+                // save request handle
 #ifdef REQHANDLE_TIMER
                 iMmSmsTsy->SetTypeOfResponse( iReqHandleType, aTsyReqHandle );
 #else
                 // Never comes here. See SetTypeOfResponse.
                 iMmTsyReqHandleStore->SetTsyReqHandle( iReqHandleType, 
                     aTsyReqHandle );
-#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 = CMmSmsTsy::EMultimodeSmsReqHandleUnknown;
+#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 = CMmSmsTsy::EMultimodeSmsReqHandleUnknown;
             break;
         }