telephonyserverplugins/common_tsy/commontsy/src/mmcustomtsy/CMmSIMTsy.cpp
changeset 20 244d7c5f118e
parent 19 1f776524b15c
child 24 6638e7f4bd8f
child 42 3adadc800673
equal deleted inserted replaced
19:1f776524b15c 20:244d7c5f118e
    20 #include <ctsy/pluginapi/cmmdatapackage.h>
    20 #include <ctsy/pluginapi/cmmdatapackage.h>
    21 #include <ctsy/tflogger.h>
    21 #include <ctsy/tflogger.h>
    22 
    22 
    23 // ======== MEMBER FUNCTIONS ========
    23 // ======== MEMBER FUNCTIONS ========
    24 
    24 
    25 CMmSIMTsy::CMmSIMTsy()
    25 CMmSIMTsy::CMmSIMTsy():
       
    26     iReqHandleType(ESIMTsyReqHandleUnknown)
    26     {
    27     {
    27     }
    28     }
    28 
    29 
    29 void CMmSIMTsy::ConstructL(
    30 void CMmSIMTsy::ConstructL(
    30     CMmCustomTsy* aMmCustomTsy )
    31     CMmCustomTsy* aMmCustomTsy )
   150     const TDataPackage& aPackage )
   151     const TDataPackage& aPackage )
   151     {
   152     {
   152 TFLOGSTRING3("TSY: CMmSIMTsy::DoExtFuncL - IPC:%d Handle:%d", aIpc, aTsyReqHandle);
   153 TFLOGSTRING3("TSY: CMmSIMTsy::DoExtFuncL - IPC:%d Handle:%d", aIpc, aTsyReqHandle);
   153     TInt ret( KErrGeneral );
   154     TInt ret( KErrGeneral );
   154 
   155 
   155     // reset last tsy request type
   156     // Ensure the ReqHandleType is unset.
   156     iReqHandleType = ESIMTsyReqHandleUnknown;
   157     // This will detect cases where this method indirectly calls itself
       
   158     // (e.g. servicing a client call that causes a self-reposting notification to complete and thus repost).
       
   159     // Such cases are not supported because iReqHandleType is in the context of this class instance,
       
   160     // not this request, and we don't want the values set by the inner request and the outer request
       
   161     // interfering with each other.
       
   162     __ASSERT_DEBUG(iReqHandleType==ESIMTsyReqHandleUnknown, User::Invariant());
   157 
   163 
   158     switch ( aIpc )
   164     switch ( aIpc )
   159         {
   165         {
   160         case EReadViagHomeZoneParamsIPC:
   166         case EReadViagHomeZoneParamsIPC:
   161             ret = ReadViagHomeZoneParamsL(
   167             ret = ReadViagHomeZoneParamsL(
   202 #ifdef REQHANDLE_TIMER
   208 #ifdef REQHANDLE_TIMER
   203         SetTypeOfResponse( iReqHandleType, aTsyReqHandle );
   209         SetTypeOfResponse( iReqHandleType, aTsyReqHandle );
   204 #else
   210 #else
   205         iTsyReqHandleStore->SetTsyReqHandle( iReqHandleType, aTsyReqHandle );
   211         iTsyReqHandleStore->SetTsyReqHandle( iReqHandleType, aTsyReqHandle );
   206 #endif // REQHANDLE_TIMER
   212 #endif // REQHANDLE_TIMER
       
   213         // We've finished with this value now. Clear it so it doesn't leak
       
   214         //  up to any other instances of this method down the call stack
       
   215         iReqHandleType = ESIMTsyReqHandleUnknown;
   207         }
   216         }
   208 
   217 
   209     return ret;
   218     return ret;
   210     }
   219     }
   211 
   220