--- a/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmcalltsy.cpp Fri Mar 19 09:55:57 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmcalltsy.cpp Fri Apr 16 16:12:37 2010 +0300
@@ -33,7 +33,9 @@
// ======== MEMBER FUNCTIONS ========
-CMmCallTsy::CMmCallTsy() : iCallParamsPckg(iCallParams)
+CMmCallTsy::CMmCallTsy() :
+ iCallParamsPckg(iCallParams),
+ iReqHandleType(EMultimodeCallReqHandleUnknown)
{
}
@@ -307,8 +309,14 @@
TInt ret( KErrNone );
TInt trapError( KErrNone );
- //reset last tsy request type
- iReqHandleType = EMultimodeCallReqHandleUnknown;
+ // Ensure the ReqHandleType is unset.
+ // This will detect cases where this method indirectly calls itself
+ // (e.g. servicing a client call that causes a self-reposting notification to complete and thus repost).
+ // Such cases are not supported because iReqHandleType is in the context of this class instance,
+ // not this request, and we don't want the values set by the inner request and the outer request
+ // interfering with each other.
+ __ASSERT_DEBUG(iReqHandleType==EMultimodeCallReqHandleUnknown, User::Invariant());
+
//before processing further the request, check if offline mode status
//is enabled and if the given request can be perfomed in that case.
@@ -344,6 +352,9 @@
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;
}
}