telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmnettsy.cpp
changeset 20 244d7c5f118e
parent 19 1f776524b15c
child 23 6b1d113cdff3
equal deleted inserted replaced
19:1f776524b15c 20:244d7c5f118e
   370         //the following methods has to be 
   370         //the following methods has to be 
   371         //cancelled in the the DOS side as well.
   371         //cancelled in the the DOS side as well.
   372         case EMobilePhoneGetDetectedNetworksV2Phase1:
   372         case EMobilePhoneGetDetectedNetworksV2Phase1:
   373         case EMobilePhoneSelectNetwork:
   373         case EMobilePhoneSelectNetwork:
   374             {
   374             {
   375             //reset last tsy request type and Traid type
   375             // Ensure the ReqHandleType is unset.
   376             iMmPhoneTsy->iReqHandleType = 
   376             // This will detect cases where this method indirectly calls itself
   377                 CMmPhoneTsy::EMultimodePhoneReqHandleUnknown;
   377             // (e.g. servicing a client call that causes a self-reposting notification to complete and thus repost).
   378 
   378             // Such cases are not supported because iReqHandleType is in the context of this class instance,
       
   379             // not this request, and we don't want the values set by the inner request and the outer request
       
   380             // interfering with each other.
       
   381             __ASSERT_DEBUG(iMmPhoneTsy->iReqHandleType==CMmPhoneTsy::EMultimodePhoneReqHandleUnknown, User::Invariant());
       
   382             
   379             TInt trapError( KErrNone );
   383             TInt trapError( KErrNone );
   380 
   384 
   381             //call cancel handling
   385             //call cancel handling
   382             TRAP( trapError, (ret = CancelToDosL( aIpc )));
   386             TRAP( trapError, (ret = CancelToDosL( aIpc )));
   383 
   387 
   416            if ( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != 
   420            if ( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != 
   417                iMmPhoneTsy->iReqHandleType )
   421                iMmPhoneTsy->iReqHandleType )
   418                 {
   422                 {
   419                 iMmPhoneTsy->iTsyReqHandleStore->SetTsyReqHandle( 
   423                 iMmPhoneTsy->iTsyReqHandleStore->SetTsyReqHandle( 
   420                     iMmPhoneTsy->iReqHandleType, aTsyReqHandle );
   424                     iMmPhoneTsy->iReqHandleType, aTsyReqHandle );
       
   425                 
       
   426                 // We've finished with this value now. Clear it so it doesn't leak
       
   427                 //  up to any other instances of this method down the call stack
       
   428                 iMmPhoneTsy->iReqHandleType=CMmPhoneTsy::EMultimodePhoneReqHandleUnknown;
   421                 }
   429                 }
   422             break;
   430             break;
   423             }    
   431             }    
   424         //Default case
   432         //Default case
   425         default:
   433         default: