diff -r 17af172ffa5f -r 630d2f34d719 telephonyserverplugins/simtsy/src/csimsmartcardeap.cpp --- a/telephonyserverplugins/simtsy/src/csimsmartcardeap.cpp Thu Aug 19 11:03:36 2010 +0300 +++ b/telephonyserverplugins/simtsy/src/csimsmartcardeap.cpp Tue Aug 31 16:23:08 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" @@ -19,9 +19,15 @@ @file */ + + +#include "OstTraceDefinitions.h" +#ifdef OST_TRACE_COMPILER_IN_USE +#include "csimsmartcardeapTraces.h" +#endif + #include #include "csimsmartcardeap.h" -#include "Simlog.h" #include "etelext.h" // CSimSmartCardEapManager implementation; related to CSimSmartCardEap // @@ -68,11 +74,11 @@ */ void CSimSmartCardEapManager::ConstructL() { - LOGPHONE1("CSimSmartCardEapManager second phase construction created"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_CONSTRUCTL_1, "CSimSmartCardEapManager second phase construction created"); ParseEapInfoL(); - LOGPHONE1("CSimSmartCardEapManager second phase construction completed"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_CONSTRUCTL_2, "CSimSmartCardEapManager second phase construction completed"); } /** @@ -80,7 +86,7 @@ */ CSimSmartCardEapManager::~CSimSmartCardEapManager() { - LOGPHONE1("CSimSmartCardEapManager destructing"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_DTOR_1, "CSimSmartCardEapManager destructing"); for (TInt jj = iSubSessionObjs.Count()-1; jj >= 0; jj--) { @@ -91,7 +97,7 @@ ClearParsedData(); - LOGPHONE1("CSimSmartCardEapManager destructed"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_DTOR_2, "CSimSmartCardEapManager destructed"); } void CSimSmartCardEapManager::ClearParsedData() @@ -136,11 +142,11 @@ */ void CSimSmartCardEapManager::ParseEapInfoL() { - LOGPHONE1("CSimSmartCardEapManager::ParseEapInfoL called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_1, "CSimSmartCardEapManager::ParseEapInfoL called"); CTestConfigItem* item = NULL; - LOGPHONE1("Starting to Parse Smart Card EAP Info"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_2, "Starting to Parse Smart Card EAP Info"); TInt count = CfgFile()->ItemCount(KScEapProcedures); // Used in parsing to keep track of the nested items @@ -163,7 +169,7 @@ item = const_cast(CfgFile()->Item(KScEapProcedures, index)); if(item == NULL) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: SC EAP PROC INFO tag not read [%d]", index); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_3, "WARNING CONFIGURATION FILE PARSING: SC EAP PROC INFO tag not read [%d]", index); continue; } @@ -179,7 +185,7 @@ ret = CTestConfig::GetElement(item->Value(), KStdDelimiter, 0, appId); if(ret != KErrNone) { - LOGPARSERR("appId", ret,0,&KScEapProcedures); + OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_4, "WARNING - CONFIGURATION FILE PARSING - Reading element APPID returned %d (element no. %d) from tag %s.", ret,0,KScEapProcedures); continue; } else @@ -194,7 +200,7 @@ ret = CTestConfig::GetElement(item->Value(), KStdDelimiter, 1, eapType); if(ret != KErrNone) { - LOGPARSERR("eapType", ret,1,&KScEapProcedures); + OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_5, "WARNING - CONFIGURATION FILE PARSING - Reading element EAPTYPE returned %d (element no. %d) from tag %s.", ret,1,KScEapProcedures); continue; } else @@ -207,17 +213,17 @@ ret = CTestConfig::GetElement(item->Value(), KStdDelimiter, 2, numChallenges); if(ret != KErrNone) { - LOGPARSERR("numChallenges", ret,2,&KScEapProcedures); + OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_6, "WARNING - CONFIGURATION FILE PARSING - Reading element NUMCHALLENGES returned %d (element no. %d) from tag %s.", ret,2,KScEapProcedures); continue; } else if (numChallenges > (countChl - nestedChlTag)) { - LOGPHONE2("ERROR CONFIGURATION FILE PARSING: error SC EAP PROC INFO specifies more challenges than available [%d]", index); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_7, "ERROR CONFIGURATION FILE PARSING: error SC EAP PROC INFO specifies more challenges than available [%d]", index); continue; } else if (numChallenges < 0) { - LOGPHONE2("ERROR CONFIGURATION FILE PARSING: error SC EAP PROC INFO specifies -ve challenge number [%d]", index); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_8, "ERROR CONFIGURATION FILE PARSING: error SC EAP PROC INFO specifies -ve challenge number [%d]", index); continue; } @@ -225,11 +231,11 @@ ret = CTestConfig::GetElement(item->Value(), KStdDelimiter, 3, dataFrmt); if(ret != KErrNone) { - LOGPHONE2("CONFIGURATION FILE PARSING: SC EAP PROC INFO tag with no data format [%d]", index); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_9, "CONFIGURATION FILE PARSING: SC EAP PROC INFO tag with no data format [%d]", index); } else if (dataFrmt >= EMaxConfigDataFormat) { - LOGPHONE2("WARNING IN CONFIGURATION FILE PARSING - error wrong data format value SC EAP PROC INFO tag [%d] (ASCII format will be used)", index); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_10, "WARNING IN CONFIGURATION FILE PARSING - error wrong data format value SC EAP PROC INFO tag [%d] (ASCII format will be used)", index); dataFrmt = EConfigDataFormatAscii; } @@ -245,21 +251,21 @@ // parse delay and key if (item == NULL) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not read EAP Key tag [%d]", nestedKeyTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_11, "WARNING CONFIGURATION FILE PARSING: could not read EAP Key tag [%d]", nestedKeyTag-1); } else { ret = CTestConfig::GetElement(item->Value(), KStdDelimiter, 0, ptr); if (ret != KErrNone) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not read EAP Key tag's data [%d]", nestedKeyTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_12, "WARNING CONFIGURATION FILE PARSING: could not read EAP Key tag's data [%d]", nestedKeyTag-1); } else { TRAPD(kAllocErr, startData = ptr.AllocL()); if (kAllocErr != KErrNone) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP Key data [%d]", nestedKeyTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_13, "WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP Key data [%d]", nestedKeyTag-1); } else { @@ -276,7 +282,7 @@ TRAP(kAllocErr, procInfo.iEapKey = tempPtr.AllocL()); if (kAllocErr != KErrNone) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP Key data copy [%d]", nestedKeyTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_14, "WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP Key data copy [%d]", nestedKeyTag-1); } delete startData; startData = NULL; @@ -286,7 +292,7 @@ } else { - LOGPHONE1("ERROR CONFIGURATION FILE PARSING: NO SC EAP KEY INFO TAG"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_15, "ERROR CONFIGURATION FILE PARSING: NO SC EAP KEY INFO TAG"); } // Get EMSK @@ -297,21 +303,21 @@ // parse key if (item == NULL) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not read EAP Ext Key tag [%d]", nestedExtKeyTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_16, "WARNING CONFIGURATION FILE PARSING: could not read EAP Ext Key tag [%d]", nestedExtKeyTag-1); } else { ret = CTestConfig::GetElement(item->Value(), KStdDelimiter, 0, ptr); if (ret != KErrNone) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not read EAP Ext Key tag's data [%d]", nestedExtKeyTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_17, "WARNING CONFIGURATION FILE PARSING: could not read EAP Ext Key tag's data [%d]", nestedExtKeyTag-1); } else { TRAPD(kAllocErr, startData = ptr.AllocL()); if (kAllocErr != KErrNone) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP Ext Key data [%d]", nestedExtKeyTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_18, "WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP Ext Key data [%d]", nestedExtKeyTag-1); } else { @@ -328,7 +334,7 @@ TRAP(kAllocErr, procInfo.iEapExtKey = tempPtr.AllocL()); if (kAllocErr != KErrNone) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP Ext Key data copy [%d]", nestedExtKeyTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_19, "WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP Ext Key data copy [%d]", nestedExtKeyTag-1); } delete startData; startData = NULL; @@ -338,7 +344,7 @@ } else { - LOGPHONE1("ERROR CONFIGURATION FILE PARSING: NO SC EAP EXT KEY INFO TAG"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_20, "ERROR CONFIGURATION FILE PARSING: NO SC EAP EXT KEY INFO TAG"); } // Get Permanent Identity @@ -349,21 +355,21 @@ // parse id if (item == NULL) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not read EAP id tag [%d]", nestedIdTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_21, "WARNING CONFIGURATION FILE PARSING: could not read EAP id tag [%d]", nestedIdTag-1); } else { ret = CTestConfig::GetElement(item->Value(), KStdDelimiter, 0, ptr); if (ret != KErrNone) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not read EAP Id tag's data [%d]", nestedIdTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_22, "WARNING CONFIGURATION FILE PARSING: could not read EAP Id tag's data [%d]", nestedIdTag-1); } else { TRAPD(idAllocErr, startData = ptr.AllocL()); if (idAllocErr != KErrNone) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP Id data [%d]", nestedIdTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_23, "WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP Id data [%d]", nestedIdTag-1); } else { @@ -381,7 +387,7 @@ TRAP(idAllocErr, procInfo.iEapId = tempPtr.AllocL()); if (idAllocErr != KErrNone) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP Id data copy [%d]", nestedIdTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_24, "WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP Id data copy [%d]", nestedIdTag-1); } delete startData; startData = NULL; @@ -391,7 +397,7 @@ } else { - LOGPHONE1("WARNING CONFIGURATION FILE PARSING: NO SC EAP ID INFO TAG"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_25, "WARNING CONFIGURATION FILE PARSING: NO SC EAP ID INFO TAG"); } // Get Pseudonym Identity @@ -402,21 +408,21 @@ // parse id if (item == NULL) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not read EAP Pseudonym id tag [%d]", nestedPsIdTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_26, "WARNING CONFIGURATION FILE PARSING: could not read EAP Pseudonym id tag [%d]", nestedPsIdTag-1); } else { ret = CTestConfig::GetElement(item->Value(), KStdDelimiter, 0, ptr); if (ret != KErrNone) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not read EAP Pseudonym Id tag's data [%d]", nestedPsIdTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_27, "WARNING CONFIGURATION FILE PARSING: could not read EAP Pseudonym Id tag's data [%d]", nestedPsIdTag-1); } else { TRAPD(idAllocErr, startData = ptr.AllocL()); if (idAllocErr != KErrNone) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP Pseudonym Id data [%d]", nestedPsIdTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_28, "WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP Pseudonym Id data [%d]", nestedPsIdTag-1); } else { @@ -434,7 +440,7 @@ TRAP(idAllocErr, procInfo.iEapPsId = tempPtr.AllocL()); if (idAllocErr != KErrNone) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP Pseudonym Id data copy [%d]", nestedPsIdTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_29, "WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP Pseudonym Id data copy [%d]", nestedPsIdTag-1); } delete startData; startData = NULL; @@ -444,7 +450,7 @@ } else { - LOGPHONE1("WARNING CONFIGURATION FILE PARSING: NO SC EAP PS ID INFO TAG"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_30, "WARNING CONFIGURATION FILE PARSING: NO SC EAP PS ID INFO TAG"); } // Get challenges @@ -457,7 +463,7 @@ { if (nestedChlTag >= countChl) { - LOGPHONE1("WARNING CONFIGURATION FILE PARSING: NO MORE SC EAP Challenge INFO TAG"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_31, "WARNING CONFIGURATION FILE PARSING: NO MORE SC EAP Challenge INFO TAG"); break; } @@ -467,7 +473,7 @@ // parse delay and challenge/response and auth status if (item == NULL) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not read EAP challenge tag [%d]", nestedChlTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_32, "WARNING CONFIGURATION FILE PARSING: could not read EAP challenge tag [%d]", nestedChlTag-1); continue; } @@ -475,14 +481,14 @@ ret = CTestConfig::GetElement(item->Value(), KStdDelimiter, 0, ptr); if (ret != KErrNone) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not read EAP challenge data [%d]", nestedChlTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_33, "WARNING CONFIGURATION FILE PARSING: could not read EAP challenge data [%d]", nestedChlTag-1); continue; } TRAPD(leaveErr, startData = ptr.AllocL()); if (leaveErr != KErrNone) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP challenge data [%d]", nestedChlTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_34, "WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP challenge data [%d]", nestedChlTag-1); continue; } tempPtr.Set(startData->Des()); @@ -498,7 +504,7 @@ TRAP(leaveErr, newChRespData.iChallenge = tempPtr.AllocL()); if (leaveErr != KErrNone) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP challenge data copy [%d]", nestedKeyTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_35, "WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP challenge data copy [%d]", nestedKeyTag-1); } delete startData; startData = NULL; @@ -507,14 +513,14 @@ ret = CTestConfig::GetElement(item->Value(), KStdDelimiter, 1, ptr); if (ret != KErrNone) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not read EAP response data [%d]", nestedChlTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_36, "WARNING CONFIGURATION FILE PARSING: could not read EAP response data [%d]", nestedChlTag-1); continue; } TRAP(leaveErr, startData = ptr.AllocL()); if (leaveErr != KErrNone) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP response data [%d]", nestedChlTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_37, "WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP response data [%d]", nestedChlTag-1); continue; } tempPtr.Set(startData->Des()); @@ -529,7 +535,7 @@ TRAP(leaveErr, newChRespData.iResp = tempPtr.AllocL()); if (leaveErr != KErrNone) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP response data copy [%d]", nestedKeyTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_38, "WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP response data copy [%d]", nestedKeyTag-1); } delete startData; startData = NULL; @@ -539,7 +545,7 @@ ret = CTestConfig::GetElement(item->Value(), KStdDelimiter, 2, stat); if (ret != KErrNone) { - LOGPHONE2("WARNING CONFIGURATION FILE PARSING: could not read EAP auth status [%d]", nestedChlTag-1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_39, "WARNING CONFIGURATION FILE PARSING: could not read EAP auth status [%d]", nestedChlTag-1); continue; } @@ -548,14 +554,14 @@ leaveErr = procInfo.iChResp.Append(newChRespData); if (leaveErr != KErrNone) { - LOGPHONE3("WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP challenge/resp data [%d] [err=%d]", nestedChlTag-1, leaveErr); + OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_40, "WARNING CONFIGURATION FILE PARSING: could not allocate mem for EAP challenge/resp data [%d] [err=%d]", nestedChlTag-1, leaveErr); } } // end while TInt errAppend = iEapProcData.Append(procInfo); if (errAppend != KErrNone) { - LOGPHONE2("ERROR CONFIGURATION FILE PARSING: Could not store parsed EAP procedure data [err=%d]", errAppend); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_41, "ERROR CONFIGURATION FILE PARSING: Could not store parsed EAP procedure data [err=%d]", errAppend); } else { @@ -563,7 +569,7 @@ } } // end for; parsing EAP procedures from config.txt - LOGPHONE1("CSimSmartCardEapManager::ParseEapInfoL completed"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_PARSEEAPINFOL_42, "CSimSmartCardEapManager::ParseEapInfoL completed"); } /** @@ -593,7 +599,7 @@ CTelObject* CSimSmartCardEapManager::CreateScEapSubSessionL(RMobilePhone::TAID& aAID, RMobileSmartCardEap::TEapType& aEapType) { - LOGPHONE1("CSimSmartCardEapManager::CreateScEapSubSessionL called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_CREATESCEAPSUBSESSIONL_1, "CSimSmartCardEapManager::CreateScEapSubSessionL called"); // If no config exists for this eapAID,eapType pair, then this will leave AID_EapType_ExistsInConfigL(aAID, aEapType); @@ -606,7 +612,7 @@ if (err != KErrNone) { - LOGPHONE2("ERROR could not create CSimSmartCardEap object [err=%d]", err); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAPMANAGER_CREATESCEAPSUBSESSIONL_2, "ERROR could not create CSimSmartCardEap object [err=%d]", err); User::Leave(err); } @@ -715,13 +721,13 @@ void CSimSmartCardEap::ConstructL(CSimSmartCardEapManager* aEapMan) { - LOGPHONE1("CSimSmartCardEap: starting second phase construction"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_CONSTRUCTL_1, "CSimSmartCardEap: starting second phase construction"); iSemaphr.CreateGlobal(KNullDesC, EOwnerThread); aEapMan->RegisterSubSessionL(this); iEapMan = aEapMan; - LOGPHONE1("CSimSmartCardEap created"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_CONSTRUCTL_2, "CSimSmartCardEap created"); } CSimSmartCardEap::~CSimSmartCardEap() @@ -741,7 +747,7 @@ } TInt err = iEapMan->DeRegisterSubSession(this); - LOGPHONE2("CSimSmartCardEap destroyed, deregistering returned %d", err); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_DTOR_1, "CSimSmartCardEap destroyed, deregistering returned %d", err); iEapMan = NULL; } @@ -947,7 +953,7 @@ TInt CSimSmartCardEap::SimInitialiseEapMethod(const TTsyReqHandle aTsyReqHandle, TThreadId* aThreadId) { - LOGPHONE1("CSimSmartCardEap::SimInitialiseEapMethod called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMINITIALISEEAPMETHOD_1, "CSimSmartCardEap::SimInitialiseEapMethod called"); // This can only be called through RMobileSmartCardEap for one instance if (iSSInitialised) @@ -962,7 +968,7 @@ TRAPD(err, iCliTerminationListener = CThreadTerminationListener::NewL(this, *aThreadId)); if (err != KErrNone) { - LOGPHONE2("ERROR could not create a client termination listener [err=%d] (not initialised)", err); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMINITIALISEEAPMETHOD_2, "ERROR could not create a client termination listener [err=%d] (not initialised)", err); ReqCompleted(aTsyReqHandle, err); } else @@ -970,7 +976,7 @@ iProcedureData = iEapMan->ProcData(iAID, iEapType); if (iProcedureData == NULL) { - LOGPHONE1("ERROR could not find sub-session's procedure"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMINITIALISEEAPMETHOD_3, "ERROR could not find sub-session's procedure"); ReqCompleted(aTsyReqHandle, KErrNotFound); return KErrNone; } @@ -988,7 +994,7 @@ TInt CSimSmartCardEap::SimInitialiseEapMethodCancel(const TTsyReqHandle aTsyReqHandle) { - LOGPHONE1("CSimSmartCardEap::SimInitialiseEapMethodCancel called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMINITIALISEEAPMETHODCANCEL_1, "CSimSmartCardEap::SimInitialiseEapMethodCancel called"); iProcedureData = NULL; iSSInitialised = EFalse; iAccessStatus = RMobileSmartCardEap::EEapMethodAvailable; @@ -999,7 +1005,7 @@ TInt CSimSmartCardEap::SimGetUserIdentity(const TTsyReqHandle aTsyReqHandle, RMobileSmartCardEap::TEapUserIdType* aEapIdType, TDes8* aUserId) { - LOGPHONE1("CSimSmartCardEap::SimGetUserIdentity called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMGETUSERIDENTITY_1, "CSimSmartCardEap::SimGetUserIdentity called"); RMobileSmartCardEap::TEapUserIdentityV6Pckg *userIdPckg = reinterpret_cast(aUserId); RMobileSmartCardEap::TEapUserIdentityV6 &userId = (*userIdPckg)(); @@ -1017,7 +1023,7 @@ if (iProcedureData->iEapId == NULL) { ReqCompleted(aTsyReqHandle, KErrNotFound); - LOGPHONE1("ERROR EAP sub-session does not contain EPermanentIdentity"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMGETUSERIDENTITY_2, "ERROR EAP sub-session does not contain EPermanentIdentity"); return KErrNone; } @@ -1028,7 +1034,7 @@ if (iProcedureData->iEapPsId == NULL) { ReqCompleted(aTsyReqHandle, KErrNotFound); - LOGPHONE1("ERROR EAP sub-session does not contain EPseudonymIdentity"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMGETUSERIDENTITY_3, "ERROR EAP sub-session does not contain EPseudonymIdentity"); return KErrNone; } @@ -1037,7 +1043,7 @@ else { ReqCompleted(aTsyReqHandle, KErrArgument); - LOGPHONE2("ERROR invalid EAP id type requested [tag=%d]", *aEapIdType); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMGETUSERIDENTITY_4, "ERROR invalid EAP id type requested [tag=%d]", *aEapIdType); return KErrNone; } @@ -1047,14 +1053,14 @@ TInt CSimSmartCardEap::SimGetUserIdentityCancel(const TTsyReqHandle aTsyReqHandle) { - LOGPHONE1("CSimSmartCardEap::SimGetUserIdentityCancel called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMGETUSERIDENTITYCANCEL_1, "CSimSmartCardEap::SimGetUserIdentityCancel called"); ReqCompleted(aTsyReqHandle, KErrCancel); return KErrNone; } TInt CSimSmartCardEap::SimGetAuthenticationStatus(const TTsyReqHandle aTsyReqHandle, RMobileSmartCardEap::TEapAuthStatus* aAuthStatus) { - LOGPHONE1("CSimSmartCardEap::SimGetAuthenticationStatus called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMGETAUTHENTICATIONSTATUS_1, "CSimSmartCardEap::SimGetAuthenticationStatus called"); (*aAuthStatus) = iAuthStatus; @@ -1064,14 +1070,14 @@ TInt CSimSmartCardEap::SimGetAuthenticationStatusCancel(const TTsyReqHandle aTsyReqHandle) { - LOGPHONE1("CSimSmartCardEap::SimGetAuthenticationStatusCancel called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMGETAUTHENTICATIONSTATUSCANCEL_1, "CSimSmartCardEap::SimGetAuthenticationStatusCancel called"); ReqCompleted(aTsyReqHandle, KErrCancel); return KErrNone; } TInt CSimSmartCardEap::SimGetEapKey(const TTsyReqHandle aTsyReqHandle, RMobileSmartCardEap::TEapKeyTag* aEapKeyTag, TDes8* aKey) { - LOGPHONE1("CSimSmartCardEap::SimGetEapKey called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMGETEAPKEY_1, "CSimSmartCardEap::SimGetEapKey called"); RMobileSmartCardEap::TEapKeyV6Pckg *keyPckg = reinterpret_cast(aKey); RMobileSmartCardEap::TEapKeyV6 &key = (*keyPckg)(); @@ -1089,7 +1095,7 @@ if (iProcedureData->iEapKey == NULL) { ReqCompleted(aTsyReqHandle, KErrNotFound); - LOGPHONE1("ERROR EAP sub-session does not contain EEapKeyMSK"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMGETEAPKEY_2, "ERROR EAP sub-session does not contain EEapKeyMSK"); return KErrNone; } @@ -1100,7 +1106,7 @@ if (iProcedureData->iEapExtKey == NULL) { ReqCompleted(aTsyReqHandle, KErrNotFound); - LOGPHONE1("ERROR EAP sub-session does not contain EEapKeyEMSK"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMGETEAPKEY_3, "ERROR EAP sub-session does not contain EEapKeyEMSK"); return KErrNone; } @@ -1109,7 +1115,7 @@ else { ReqCompleted(aTsyReqHandle, KErrArgument); - LOGPHONE2("ERROR invalid EAP key tag requested [tag=%d]", *aEapKeyTag); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMGETEAPKEY_4, "ERROR invalid EAP key tag requested [tag=%d]", *aEapKeyTag); return KErrNone; } @@ -1119,14 +1125,14 @@ TInt CSimSmartCardEap::SimGetEapKeyCancel(const TTsyReqHandle aTsyReqHandle) { - LOGPHONE1("CSimSmartCardEap::SimGetEapKeyCancel called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMGETEAPKEYCANCEL_1, "CSimSmartCardEap::SimGetEapKeyCancel called"); ReqCompleted(aTsyReqHandle, KErrCancel); return KErrNone; } TInt CSimSmartCardEap::SimSetAuthenticateDataForPhase1(const TTsyReqHandle aTsyReqHandle, TDes8* aEapAuthData, TInt* aPhase1Size) { - LOGPHONE1("CSimSmartCardEap::SimSetAuthenticateDataForPhase1 called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMSETAUTHENTICATEDATAFORPHASE1_1, "CSimSmartCardEap::SimSetAuthenticateDataForPhase1 called"); if (iCurrentChallenge >= iProcedureData->iChResp.Count()) { @@ -1138,7 +1144,7 @@ TRAPD(err, authReq = RMobileSmartCardEap::CEapAuthenticateRequestDataV6::NewL()); if (err != KErrNone) { - LOGPHONE2("ERR Could not allocate memory for challenge request object [err=%d]", err); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMSETAUTHENTICATEDATAFORPHASE1_2, "ERR Could not allocate memory for challenge request object [err=%d]", err); ReqCompleted(aTsyReqHandle, err); return KErrNone; } @@ -1146,7 +1152,7 @@ TRAP(err, authReq->InternalizeL(*aEapAuthData)); if (err != KErrNone) { - LOGPHONE2("ERR Could not allocate memory for challenge request [err=%d]", err); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMSETAUTHENTICATEDATAFORPHASE1_3, "ERR Could not allocate memory for challenge request [err=%d]", err); ReqCompleted(aTsyReqHandle, err); return KErrNone; } @@ -1158,7 +1164,7 @@ if (reqPacket != tempPtr) { - LOGPHONE2("ERR challenge request does not match config [currentChallenge=%d]", iCurrentChallenge); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMSETAUTHENTICATEDATAFORPHASE1_4, "ERR challenge request does not match config [currentChallenge=%d]", iCurrentChallenge); ReqCompleted(aTsyReqHandle, KErrCorrupt); return KErrNone; } @@ -1171,7 +1177,7 @@ TInt CSimSmartCardEap::SimGetAuthenticateDataForPhase2(const TTsyReqHandle aTsyReqHandle, TDes8* /*aEapAuthData*/, TDes8* aPhase2Resp) { - LOGPHONE1("CSimSmartCardEap::SimSetAuthenticateDataForPhase2 called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMGETAUTHENTICATEDATAFORPHASE2_1, "CSimSmartCardEap::SimSetAuthenticateDataForPhase2 called"); if (iCurrentChallenge >= iProcedureData->iChResp.Count()) { @@ -1192,14 +1198,14 @@ TInt CSimSmartCardEap::SimSmartCardEapAuthenticationCancel(const TTsyReqHandle aTsyReqHandle) { - LOGPHONE1("CSimSmartCardEap::SimSmartCardEapAuthenticationCancel called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMSMARTCARDEAPAUTHENTICATIONCANCEL_1, "CSimSmartCardEap::SimSmartCardEapAuthenticationCancel called"); ReqCompleted(aTsyReqHandle, KErrCancel); return KErrNone; } TInt CSimSmartCardEap::SimReleaseEapMethod(const TTsyReqHandle aTsyReqHandle) { - LOGPHONE1("CSimSmartCardEap::SimReleaseEapMethod called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMRELEASEEAPMETHOD_1, "CSimSmartCardEap::SimReleaseEapMethod called"); iSSInitialised = EFalse; iAccessStatus = RMobileSmartCardEap::EEapMethodAvailable; ReqCompleted(aTsyReqHandle, KErrNone); @@ -1215,7 +1221,7 @@ TInt CSimSmartCardEap::SimGetEapMethodAccessStatus(const TTsyReqHandle aTsyReqHandle, RMobileSmartCardEap::TEapMethodAccessStatus* aEapState) { - LOGPHONE1("CSimSmartCardEap::SimGetEapMethodAccessStatus called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMGETEAPMETHODACCESSSTATUS_1, "CSimSmartCardEap::SimGetEapMethodAccessStatus called"); *aEapState = iAccessStatus; ReqCompleted(aTsyReqHandle, KErrNone); return KErrNone; @@ -1223,7 +1229,7 @@ TInt CSimSmartCardEap::SimNotifyEapMethodAccessStatusChange(const TTsyReqHandle aTsyReqHandle, RMobileSmartCardEap::TEapMethodAccessStatus* aEapState) { - LOGPHONE1("CSimSmartCardEap::SimNotifyEapMethodAccessStatusChange called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMNOTIFYEAPMETHODACCESSSTATUSCHANGE_1, "CSimSmartCardEap::SimNotifyEapMethodAccessStatusChange called"); __ASSERT_ALWAYS(!iEapAccessNotifyData.iNotifyPending, PanicClient(EEtelPanicRequestAsyncTwice)); iEapAccessNotifyData.iNotifyPending = ETrue; @@ -1235,7 +1241,7 @@ TInt CSimSmartCardEap::SimNotifyEapMethodAccessStatusChangeCancel(const TTsyReqHandle aTsyReqHandle) { - LOGPHONE1("CSimSmartCardEap::SimNotifyEapMethodAccessStatusChangeCancel called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMNOTIFYEAPMETHODACCESSSTATUSCHANGECANCEL_1, "CSimSmartCardEap::SimNotifyEapMethodAccessStatusChangeCancel called"); if(iEapAccessNotifyData.iNotifyPending) { iEapAccessNotifyData.iNotifyPending = EFalse; @@ -1249,7 +1255,7 @@ void CSimSmartCardEap::SimCompleteNotifyEapMethodAccessStatusChange() { - LOGPHONE1("CSimSmartCardEap::SimCompleteNotifyEapMethodAccessStatusChange called"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMARTCARDEAP_SIMCOMPLETENOTIFYEAPMETHODACCESSSTATUSCHANGE_1, "CSimSmartCardEap::SimCompleteNotifyEapMethodAccessStatusChange called"); if(iEapAccessNotifyData.iNotifyPending) {