diff -r 2473f5e227f9 -r 8b72faa1200f telephonyserverplugins/simtsy/src/CSimMbmsPacketContext.cpp --- a/telephonyserverplugins/simtsy/src/CSimMbmsPacketContext.cpp Mon May 24 18:38:31 2010 +0100 +++ b/telephonyserverplugins/simtsy/src/CSimMbmsPacketContext.cpp Tue Jun 22 11:02:32 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -19,7 +19,13 @@ @file */ -#include "Simlog.h" + + +#include "OstTraceDefinitions.h" +#ifdef OST_TRACE_COMPILER_IN_USE +#include "CSimMbmsPacketContextTraces.h" +#endif + #include "CSimPhone.h" #include "CSimMbmsPacketContext.h" #include "CSimPacketQoS.h" @@ -55,7 +61,7 @@ * @param aContextName name for this packet context */ { - LOGPACKET1("CSimMbmsPacketContext: Entered constructor"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_CTOR_1, "CSimMbmsPacketContext: Entered constructor"); iNotifyConfigMBMS.iNotifyPending = EFalse; iNotifyStatusChange.iNotifyPending = EFalse; } @@ -68,7 +74,7 @@ * @leave Leaves no memory or any data member does not construct for any reason. */ { - LOGPACKET1("CSimMbmsPacketContext: Entered constructL function"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_CONSTRUCTL_1, "CSimMbmsPacketContext: Entered constructL function"); CSimPacketContext::ConstructL(); iMbmsSetConfigTimer = CSimTimer::NewL(iPhone); @@ -199,7 +205,7 @@ * */ { - LOGPACKET1("CSimMbmsPacketContext: Entered destructor"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_DTOR_1, "CSimMbmsPacketContext: Entered destructor"); if (iMbmsSetConfigTimer != NULL) { @@ -257,7 +263,7 @@ * @ return NULL. */ { - LOGPACKET1("Unexpected call to CSimMbmsPacketContext: OpenNewObjectByName"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_OPENNEWOBJECTBYNAMEL_1, "Unexpected call to CSimMbmsPacketContext: OpenNewObjectByName"); User::Leave(KErrNotSupported); return NULL; } @@ -272,7 +278,7 @@ * @leave Leaves if out of memory. */ { - LOGPACKET1("Unexpected call to CSimMbmsPacketContext: OpenNewObjectL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_OPENNEWOBJECTL_1, "Unexpected call to CSimMbmsPacketContext: OpenNewObjectL"); User::Leave(KErrNotSupported); return NULL; } @@ -287,7 +293,7 @@ * @leave Leaves if not supported by this tsy */ { - LOGPACKET1("CSimMbmsPacketContext: ReqModeL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_REQMODEL_1, "CSimMbmsPacketContext: ReqModeL"); CTelObject::TReqMode ret=0; switch (aIpc) { @@ -310,8 +316,8 @@ ret=KReqModeMultipleCompletionEnabled | KReqModeRePostImmediately; break; default: - LOGPACKET1("CSimMbmsPacketContext: ReqModeL error, unknown IPC"); - LOGPACKET1("CSimMbmsPacketContext: ReqModeL sending the request to CSimPacketContext"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_REQMODEL_2, "CSimMbmsPacketContext: ReqModeL error, unknown IPC"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_REQMODEL_3, "CSimMbmsPacketContext: ReqModeL sending the request to CSimPacketContext"); ret = CSimPacketContext::ReqModeL(aIpc); break; } @@ -330,18 +336,18 @@ * @return err KErrNone if fine */ { - LOGPACKET1("CSimMbmsPacketContext: RegisterNotification called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_REGISTERNOTIFICATION_1, "CSimMbmsPacketContext: RegisterNotification called"); switch (aIpc) { case EPacketContextNotifyConfigChanged: case EPacketContextNotifyStatusChange: case EPacketContextNotifyDataTransferred: - LOGPACKET1("CSimMbmsPacketContext: RegisterNotification"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_REGISTERNOTIFICATION_2, "CSimMbmsPacketContext: RegisterNotification"); return KErrNone; default: // Unknown or invalid IPC - LOGPACKET1("CSimMbmsPacketContext: Register error, unknown IPC"); - LOGPACKET1("CSimMbmsPacketContext: Register sending the request to CSimPacketContext"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_REGISTERNOTIFICATION_3, "CSimMbmsPacketContext: Register error, unknown IPC"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_REGISTERNOTIFICATION_4, "CSimMbmsPacketContext: Register sending the request to CSimPacketContext"); return CSimPacketContext::RegisterNotification(aIpc); } } @@ -359,18 +365,18 @@ * @return err KErrNone if fine */ { - LOGPACKET1("CSimMbmsPacketContext: DeregisterNotification called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_DEREGISTERNOTIFICATION_1, "CSimMbmsPacketContext: DeregisterNotification called"); switch (aIpc) { case EPacketContextNotifyConfigChanged: case EPacketContextNotifyStatusChange: case EPacketContextNotifyDataTransferred: - LOGPACKET1("CSimMbmsPacketContext: DeregisterNotification"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_DEREGISTERNOTIFICATION_2, "CSimMbmsPacketContext: DeregisterNotification"); return KErrNone; default: // Unknown or invalid IPC - LOGPACKET1("CSimMbmsPacketContext: Deregister error, unknown IPC"); - LOGPACKET1("CSimMbmsPacketContext: Deregister sending the request to CSimPacketContext"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_DEREGISTERNOTIFICATION_3, "CSimMbmsPacketContext: Deregister error, unknown IPC"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_DEREGISTERNOTIFICATION_4, "CSimMbmsPacketContext: Deregister sending the request to CSimPacketContext"); return CSimPacketContext::DeregisterNotification(aIpc); } } @@ -385,20 +391,20 @@ * @return err KErrNone if fine */ { - LOGPACKET1("CSimMbmsPacketContext: NumberOfSlotsL called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_NUMBEROFSLOTSL_1, "CSimMbmsPacketContext: NumberOfSlotsL called"); TInt numberOfSlots=1; switch (aIpc) { case EPacketContextNotifyConfigChanged: case EPacketContextNotifyStatusChange: case EPacketContextNotifyDataTransferred: - LOGPACKET1("CSimMbmsPacketContext: Registered with 5 slots"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_NUMBEROFSLOTSL_2, "CSimMbmsPacketContext: Registered with 5 slots"); numberOfSlots=5; break; default: // Unknown or invalid IPC - LOGPACKET1("CSimMbmsPacketContext: Number of Slots error, unknown IPC"); - LOGPACKET1("CSimMbmsPacketContext: Number of Slots: sending the request to CSimPacketContext"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_NUMBEROFSLOTSL_3, "CSimMbmsPacketContext: Number of Slots error, unknown IPC"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_NUMBEROFSLOTSL_4, "CSimMbmsPacketContext: Number of Slots: sending the request to CSimPacketContext"); return CSimPacketContext::NumberOfSlotsL(aIpc); } return numberOfSlots; @@ -425,7 +431,7 @@ ReqCompleted(aTsyReqHandle,KErrNotReady); return KErrNone; } - LOGPACKET1("CSimMbmsPacketContext: ExtFunc Called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_EXTFUNC_1, "CSimMbmsPacketContext: ExtFunc Called"); TAny* dataPtr=aPackage.Ptr1(); TAny* dataPtr2=aPackage.Ptr2(); @@ -444,7 +450,7 @@ //>CSimMbmsPacketContext::TimerCallBack Default Case for Context Events"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_TIMERCALLBACK_4, ">>CSimMbmsPacketContext::TimerCallBack Default Case for Context Events"); switch(iCurrentEvent) { case EMbmsContextEventNone: - LOGPACKET1("TimerCallBack - iCurrentEvent = [EMbmsContextEventNone]"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_TIMERCALLBACK_5, "TimerCallBack - iCurrentEvent = [EMbmsContextEventNone]"); break; case EMbmsContextEventActivate: - LOGPACKET1("TimerCallBack - iCurrentEvent = [EMbmsContextEventActivate]"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_TIMERCALLBACK_6, "TimerCallBack - iCurrentEvent = [EMbmsContextEventActivate]"); if(iState==RPacketContext::EStatusActivating) { TInt activateValue = iMbmsContextConfigParams->At(iMbmsContextConfigParamsIndex).iActivateCode; @@ -615,11 +621,11 @@ } else { - LOGPACKET1("Unexpected iState for iCurrentEvent[EMbmsContextEventActivate]"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_TIMERCALLBACK_7, "Unexpected iState for iCurrentEvent[EMbmsContextEventActivate]"); } break; case EMbmsContextEventDeactivate: - LOGPACKET1("TimerCallBack - iCurrentEvent = [EMbmsContextEventDeactivate]"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_TIMERCALLBACK_8, "TimerCallBack - iCurrentEvent = [EMbmsContextEventDeactivate]"); if(((iState == RPacketContext::EStatusInactive) || (iState == RPacketContext::EStatusDeactivating)) && (iCurrentEvent==EMbmsContextEventDeactivate)) { @@ -630,11 +636,11 @@ } else { - LOGPACKET1("Unexpected iState for iCurrentEvent[EMbmsContextEventActivate]"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_TIMERCALLBACK_9, "Unexpected iState for iCurrentEvent[EMbmsContextEventActivate]"); } break; case EMbmsContextEventDelete: - LOGPACKET1("TimerCallBack - iCurrentEvent = [EMbmsContextEventDelete]"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_TIMERCALLBACK_10, "TimerCallBack - iCurrentEvent = [EMbmsContextEventDelete]"); if(iState == RPacketContext::EStatusInactive && !iIsActive ) { TInt ret = ChangeState(RPacketContext::EStatusDeleted); @@ -649,8 +655,8 @@ break; default: { - LOGPACKET1("CSimMbmsPacketContext::TimerCallBack"); - LOGPACKET1("<CfgFile(); } @@ -690,7 +696,7 @@ * @return KErrNone */ { - LOGPACKET1("CSimMbmsPacketContext::SetConfig called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_SETCONFIG_1, "CSimMbmsPacketContext::SetConfig called"); TPckg* configBase = (TPckg*)aConfig; TPacketDataConfigBase& configBaseV1 = (*configBase)(); @@ -780,7 +786,7 @@ * @return KErrNone */ { - LOGPACKET1("CSimMbmsPacketContext::GetConfig called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_GETCONFIG_1, "CSimMbmsPacketContext::GetConfig called"); TPckg* configBase = (TPckg*)aConfig; TPacketDataConfigBase& configBaseV1 = (*configBase)(); @@ -816,7 +822,7 @@ * @return err KErrNone */ { - LOGPACKET1("CSimMbmsPacketContext::GetConfigCancel called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_GETCONFIGCANCEL_1, "CSimMbmsPacketContext::GetConfigCancel called"); return KErrNone; } @@ -829,7 +835,7 @@ * @return KerrNone */ { - LOGPACKET1("CSimMbmsPacketContext::GetStatus called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_GETSTATUS_1, "CSimMbmsPacketContext::GetStatus called"); *aContextStatus = iState; ReqCompleted(aTsyReqHandle,KErrNone); return KErrNone; @@ -863,7 +869,7 @@ * @return KErrNone */ { - LOGPACKET1("CSimMbmsPacketContext::ActivateCancel called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_ACTIVATECANCEL_1, "CSimMbmsPacketContext::ActivateCancel called"); iMbmsContextTimer->Cancel(); if(((iState == RPacketContext::EStatusInactive) || (iState == RPacketContext::EStatusActivating)) && (iCurrentEvent==EMbmsContextEventActivate)) @@ -902,7 +908,7 @@ * @return KErrNone */ { - LOGPACKET1("CSimMbmsPacketContext::Deactivate called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_DEACTIVATE_1, "CSimMbmsPacketContext::Deactivate called"); iDeactivateRequestHandle = aTsyReqHandle; TInt ret = ActionEvent(EMbmsContextEventDeactivate); return ret; @@ -919,7 +925,7 @@ * @return KErrNone */ { - LOGPACKET1("CSimMbmsPacketContext::DeactivateCancel called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_DEACTIVATECANCEL_1, "CSimMbmsPacketContext::DeactivateCancel called"); iMbmsContextTimer->Cancel(); if(((iState == RPacketContext::EStatusInactive) || (iState == RPacketContext::EStatusDeactivating)) && (iCurrentEvent==EMbmsContextEventDeactivate)) @@ -993,7 +999,7 @@ * @return KErrNone */ { - LOGPACKET1("CSimMbmsPacketContext::Delete called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_DELETE_1, "CSimMbmsPacketContext::Delete called"); iDeleteRequestHandle = aTsyReqHandle; TInt ret = ActionEvent(EMbmsContextEventDelete); return ret; @@ -1009,7 +1015,7 @@ * @return KErrNone */ { - LOGPACKET1("CSimMbmsPacketContext::DeleteCancel called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_DELETECANCEL_1, "CSimMbmsPacketContext::DeleteCancel called"); iMbmsContextTimer->Cancel(); if((iState == RPacketContext::EStatusInactive) && (iCurrentEvent==EMbmsContextEventDelete)) { @@ -1028,7 +1034,7 @@ * @return KerrNone */ { - LOGPACKET1("CSimMbmsPacketContext::GetLastErrorCause called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_GETLASTERRORCAUSE_1, "CSimMbmsPacketContext::GetLastErrorCause called"); ReqCompleted(aTsyReqHandle,iLastError); return KErrNone; @@ -1044,7 +1050,7 @@ * @return KErrNone */ { - LOGPACKET1("CSimMbmsPacketContext::NotifyConfigChanged called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_NOTIFYCONFIGCHANGED_1, "CSimMbmsPacketContext::NotifyConfigChanged called"); TPckg* configBase = (TPckg*)aConfig; TPacketDataConfigBase& configBaseV1 = (*configBase)(); @@ -1058,7 +1064,7 @@ } else { - LOGPACKET1("CSimMbmsPacketContext::NotifyConfigChanged Unexpected config for MBMS context"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_NOTIFYCONFIGCHANGED_2, "CSimMbmsPacketContext::NotifyConfigChanged Unexpected config for MBMS context"); } return KErrNone; @@ -1073,7 +1079,7 @@ * @return KErrNone */ { - LOGPACKET1("CSimMbmsPacketContext::NotifyConfigChangedCancel called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_NOTIFYCONFIGCHANGEDCANCEL_1, "CSimMbmsPacketContext::NotifyConfigChangedCancel called"); if(iNotifyConfigMBMS.iNotifyPending && iNotifyConfigMBMS.iNotifyHandle == aTsyReqHandle) { @@ -1100,7 +1106,7 @@ * @return KErrNone */ { - LOGPACKET1("CSimMbmsPacketContext::NotifyStatusChange called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_NOTIFYSTATUSCHANGE_1, "CSimMbmsPacketContext::NotifyStatusChange called"); __ASSERT_ALWAYS(!iNotifyStatusChange.iNotifyPending,SimPanic(ENotificationAlreadyPending)); iNotifyStatusChange.iNotifyPending = ETrue; iNotifyStatusChange.iNotifyHandle = aTsyReqHandle; @@ -1117,7 +1123,7 @@ * @return KErrNone */ { - LOGPACKET1("CSimMbmsPacketContext::NotifyStatusChangeCancel called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_NOTIFYSTATUSCHANGECANCEL_1, "CSimMbmsPacketContext::NotifyStatusChangeCancel called"); if(iNotifyStatusChange.iNotifyPending) { iNotifyStatusChange.iNotifyPending=EFalse; @@ -1130,7 +1136,7 @@ return KErrNone; } -TInt CSimMbmsPacketContext::UpdateMbmsSessionListL(const TTsyReqHandle aTsyReqHandle,TMbmsAction* aAction, TUint* aSessionId) +TInt CSimMbmsPacketContext::UpdateMbmsSessionList(const TTsyReqHandle aTsyReqHandle,TMbmsAction* aAction, TUint* aSessionId) /** * client's interest in updating the MBMS session's list. * This is achieved by updating the list maintained internally by the context @@ -1141,7 +1147,7 @@ * @return KErrNone */ { - LOGPACKET1("CSimMbmsPacketContext::UpdateMbmsSessionListL called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_UPDATEMBMSSESSIONLIST_1, "CSimMbmsPacketContext::UpdateMbmsSessionList called"); TInt error=KErrNone; iUpdateSessionHandle = aTsyReqHandle; @@ -1151,29 +1157,34 @@ switch(*aAction) { case SIMTSY_PACKET_MBMS_ADD_ENTRIES: - LOGPACKET1("CSimMbmsPacketContext::UpdateMbmsSessionListL Action: ADD "); - TRAP(error,iSessionIdList->AppendL(*aSessionId)); - if(error == KErrNone) - { - //iSessionIdList->At(0) = ++iNumOfSessionId; - iSessionIdList->Delete(0); - iSessionIdList->InsertL(0,++iNumOfSessionId); - iMbmsUpdateSessionTimer->Start(RandTime(),this,ETimerIdMbmsUpdateSessionId); - } - else + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_UPDATEMBMSSESSIONLIST_2, "CSimMbmsPacketContext::UpdateMbmsSessionList Action: ADD "); + + // TRAP can contain multiple statments + TRAP(error,iSessionIdList->AppendL(*aSessionId); + //iSessionIdList->At(0) = ++iNumOfSessionId; + iSessionIdList->Delete(0); + iSessionIdList->InsertL(0,++iNumOfSessionId)); + + iMbmsUpdateSessionTimer->Start(RandTime(),this,ETimerIdMbmsUpdateSessionId); + + if(error != KErrNone) { ReqCompleted(iUpdateSessionHandle,error); } break; case SIMTSY_PACKET_MBMS_REM_ENTRIES: - LOGPACKET1("CSimMbmsPacketContext::UpdateMbmsSessionListL Action: REMOVE "); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_UPDATEMBMSSESSIONLIST_3, "CSimMbmsPacketContext::UpdateMbmsSessionList Action: REMOVE "); iSessionIdList->Find(*aSessionId,key,position); if(position != -1) { iSessionIdList->Delete(position); //iSessionIdList->At(0) = --iNumOfSessionId; - iSessionIdList->InsertL(0,--iNumOfSessionId); + TRAP(error, iSessionIdList->InsertL(0,--iNumOfSessionId)); + if(error != KErrNone) + { + ReqCompleted(iUpdateSessionHandle,error); + } iMbmsUpdateSessionTimer->Start(RandTime(),this,ETimerIdMbmsUpdateSessionId); } else @@ -1184,16 +1195,20 @@ break; case SIMTSY_PACKET_MBMS_REM_ALL_ENTRIES: - LOGPACKET1("CSimMbmsPacketContext::UpdateMbmsSessionListL Action: REMOVE_ALL "); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_UPDATEMBMSSESSIONLIST_4, "CSimMbmsPacketContext::UpdateMbmsSessionList Action: REMOVE_ALL "); iNumOfSessionId=0; //iSessionIdList->At(0) = iNumOfSessionId; - iSessionIdList->InsertL(0,iNumOfSessionId); + TRAP(error, iSessionIdList->InsertL(0,iNumOfSessionId)); + if(error != KErrNone) + { + ReqCompleted(iUpdateSessionHandle,error); + } iSessionIdList->Delete(1,iSessionIdList->Count()); // removing all session ids from the list ReqCompleted(aTsyReqHandle, KErrNone); break; default: - LOGPACKET1("CSimMbmsPacketContext::UpdateMbmsSessionListL Action: Default "); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_UPDATEMBMSSESSIONLIST_5, "CSimMbmsPacketContext::UpdateMbmsSessionList Action: Default "); ReqCompleted(aTsyReqHandle,KErrNotFound); break; } @@ -1208,7 +1223,7 @@ * @return KErrNone */ { - LOGPACKET1("CSimMbmsPacketContext::UpdateMbmsSessionListCancel called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_UPDATEMBMSSESSIONLISTCANCEL_1, "CSimMbmsPacketContext::UpdateMbmsSessionListCancel called"); iMbmsUpdateSessionTimer->Cancel(); if( iUpdateSessionHandle == aTsyReqHandle ) { @@ -1291,7 +1306,7 @@ * @return KErrNone */ { - LOGPACKET1("CSimMbmsPacketContext::GetMbmsSessionsPhase1 called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_GETMBMSSESSIONSPHASE1_1, "CSimMbmsPacketContext::GetMbmsSessionsPhase1 called"); iGetMbmsSessionHandle = aTsyReqHandle; TInt ret=KErrNone; TInt leaveCode=KErrNone; @@ -1317,7 +1332,7 @@ { // Retrieve MBMS session list, // Store the sessions and then return the size of the buffer to the client - LOGPACKET1("CSimMbmsPacketContext::ProcessGetMbmsSessionsPhase1L called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_PROCESSGETMBMSSESSIONSPHASE1L_1, "CSimMbmsPacketContext::ProcessGetMbmsSessionsPhase1L called"); RPacketMbmsContext::CMbmsSession* mbmsSession=RPacketMbmsContext::CMbmsSession::NewL(); CleanupStack::PushL(mbmsSession); @@ -1366,7 +1381,7 @@ * @return KErrNone */ { - LOGPACKET1("CSimMbmsPacketContext::GetMbmsSessionsPhase2 called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_GETMBMSSESSIONSPHASE2_1, "CSimMbmsPacketContext::GetMbmsSessionsPhase2 called"); CPcktListReadAllAttempt* read=NULL; // Find the get Mbms monitored services from this client for (TInt i=0; iCount(); ++i) @@ -1397,7 +1412,7 @@ * @return KErrNone */ { - LOGPACKET1("CSimMbmsPacketContext::GetMbmsSessionsCancel called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_GETMBMSSESSIONSCANCEL_1, "CSimMbmsPacketContext::GetMbmsSessionsCancel called"); // Remove the MBMS sessions from iMbmsSessionList CPcktListReadAllAttempt* read=NULL; @@ -1425,7 +1440,7 @@ * @return Error indication if change of state is successful or not */ { - LOGPACKET2("CSimMbmsPacketContext::ChangeState [newState=%d]", aNewState); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMMBMSPACKETCONTEXT_CHANGESTATE_1, "CSimMbmsPacketContext::ChangeState [newState=%d]", aNewState); __ASSERT_ALWAYS(aNewState!=RPacketContext::EStatusUnknown,SimPanic(ECallStatusUnknownIllegal)); if(iState==aNewState) @@ -1474,7 +1489,7 @@ ReqCompleted(iNotifyStatusChange.iNotifyHandle,KErrNone); } - LOGPACKET1("<