--- a/telephonyserverplugins/simtsy/src/CSimPhoneSecurity.cpp Thu May 27 14:05:07 2010 +0300
+++ b/telephonyserverplugins/simtsy/src/CSimPhoneSecurity.cpp Fri Jun 11 14:49:29 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2002-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,8 +19,14 @@
@file
*/
+
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "CSimPhoneSecurityTraces.h"
+#endif
+
#include "CSimPhone.h"
-#include "Simlog.h"
#include "utils.h"
#include "CSimPhoneSecurity.h"
#include <testconfigfileparser.h>
@@ -66,7 +72,7 @@
* delays from the configuration file.
*/
{
- LOGPHONE1("Starting to parse PhoneSecurity additional config parameters...");
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_1, "Starting to parse PhoneSecurity additional config parameters...");
iNotifySettingsTimer = CIccTimer::NewL();
iNotifySecurityEventsTimer = CIccTimer::NewL();
@@ -86,14 +92,14 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,temp);
if(ret!=KErrNone)
{
- LOGPARSERR("temp",ret,0,&KSecurityCodes);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_2, "WARNING - CONFIGURATION FILE PARSING - Reading element TEMP returned %d (element no. %d) from tag %s.",ret,0,KSecurityCodes);
}
else
iSecCodes.iPin1.Copy(temp);
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,temp);
if(ret!=KErrNone)
{
- LOGPARSERR("temp",ret,1,&KSecurityCodes);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_3, "WARNING - CONFIGURATION FILE PARSING - Reading element TEMP returned %d (element no. %d) from tag %s.",ret,1,KSecurityCodes);
}
else
iSecCodes.iPin2.Copy(temp);
@@ -101,7 +107,7 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,temp);
if(ret!=KErrNone)
{
- LOGPARSERR("temp",ret,2,&KSecurityCodes);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_4, "WARNING - CONFIGURATION FILE PARSING - Reading element TEMP returned %d (element no. %d) from tag %s.",ret,2,KSecurityCodes);
}
else
iSecCodes.iPuk1.Copy(temp);
@@ -109,7 +115,7 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,temp);
if(ret!=KErrNone)
{
- LOGPARSERR("temp",ret,3,&KSecurityCodes);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_5, "WARNING - CONFIGURATION FILE PARSING - Reading element TEMP returned %d (element no. %d) from tag %s.",ret,3,KSecurityCodes);
}
else
iSecCodes.iPuk2.Copy(temp);
@@ -117,7 +123,7 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,temp);
if(ret!=KErrNone)
{
- LOGPARSERR("temp",ret,4,&KSecurityCodes);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_6, "WARNING - CONFIGURATION FILE PARSING - Reading element TEMP returned %d (element no. %d) from tag %s.",ret,4,KSecurityCodes);
}
else
iSecCodes.iPhonePassword.Copy(temp);
@@ -125,7 +131,7 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,temp);
if(ret!=KErrNone)
{
- LOGPARSERR("temp",ret,5,&KSecurityCodes);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_7, "WARNING - CONFIGURATION FILE PARSING - Reading element TEMP returned %d (element no. %d) from tag %s.",ret,5,KSecurityCodes);
}
else
iSecCodes.iSPC.Copy(temp);
@@ -133,7 +139,7 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,6,temp);
if(ret!=KErrNone)
{
- LOGPARSERR("temp",ret,6,&KSecurityCodes);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_8, "WARNING - CONFIGURATION FILE PARSING - Reading element TEMP returned %d (element no. %d) from tag %s.",ret,6,KSecurityCodes);
}
else
iSecCodes.iPhBkHiddenKey.Copy(temp);
@@ -141,7 +147,7 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,7,temp);
if(ret!=KErrNone)
{
- LOGPARSERR("temp",ret,7,&KSecurityCodes);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_9, "WARNING - CONFIGURATION FILE PARSING - Reading element TEMP returned %d (element no. %d) from tag %s.",ret,7,KSecurityCodes);
}
else
iSecCodes.iUSimAppPin.Copy(temp);
@@ -149,7 +155,7 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,8,temp);
if(ret!=KErrNone)
{
- LOGPARSERR("temp",ret,8,&KSecurityCodes);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_10, "WARNING - CONFIGURATION FILE PARSING - Reading element TEMP returned %d (element no. %d) from tag %s.",ret,8,KSecurityCodes);
}
else
iSecCodes.iSecondUSimAppPin.Copy(temp);
@@ -157,7 +163,7 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,9,temp);
if(ret!=KErrNone)
{
- LOGPARSERR("temp",ret,9,&KSecurityCodes);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_11, "WARNING - CONFIGURATION FILE PARSING - Reading element TEMP returned %d (element no. %d) from tag %s.",ret,9,KSecurityCodes);
}
else
iSecCodes.iUniversalPin.Copy(temp);
@@ -172,14 +178,13 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,temp);
if(ret!=KErrNone)
{
- LOGPARSERR(&KSecurityCodeAttempts,ret,0,&KSecurityCodeAttempts);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_12, "WARNING - CONFIGURATION FILE PARSING - Reading element SECURITYCODEATTEMPTS returned %d (element no. %d) from tag %s." ,ret,0,KSecurityCodeAttempts);
}
else
{
if (temp <= 0)
{
- LOGPARSERRANGE(&KSecurityCodeAttempts,temp,"> 0",0,&KSecurityCodeAttempts);
- LOGCONFIG1("Using default value...");
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_13, "Using default value...");
temp = KDefaultPinEntryAttempts;
}
iSecurityCodeRemainigAttempts.iPin1=temp;
@@ -188,14 +193,14 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,temp);
if(ret!=KErrNone)
{
- LOGPARSERR(&KSecurityCodeAttempts,ret,1,&KSecurityCodeAttempts);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_14, "WARNING - CONFIGURATION FILE PARSING - Reading element SECURITYCODEATTEMPTS returned %d (element no. %d) from tag %s." ,ret,1,KSecurityCodeAttempts);
}
else
{
if (temp <= 0)
{
- LOGPARSERRANGE(&KSecurityCodeAttempts,temp,"> 0",1,&KSecurityCodeAttempts);
- LOGCONFIG1("Using default value...");
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_15, "Reading element SECURITYCODEATTEMPTS returned %d (element no. %d) from tag %s expected > 0" ,temp,1,KSecurityCodeAttempts);
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_16, "Using default value...");
temp = KDefaultPinEntryAttempts;
}
iSecurityCodeRemainigAttempts.iPin2=temp;
@@ -204,14 +209,14 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,temp);
if(ret!=KErrNone)
{
- LOGPARSERR(&KSecurityCodeAttempts,ret,2,&KSecurityCodeAttempts);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_17, "WARNING - CONFIGURATION FILE PARSING - Reading element SECURITYCODEATTEMPTS returned %d (element no. %d) from tag %s." ,ret,2,KSecurityCodeAttempts);
}
else
{
if (temp <= 0)
{
- LOGPARSERRANGE(&KSecurityCodeAttempts,temp,"> 0",2,&KSecurityCodeAttempts);
- LOGCONFIG1("Using default value...");
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_18, "Reading element SECURITYCODEATTEMPTS returned %d (element no. %d) from tag %s expected > 0" ,temp,2,KSecurityCodeAttempts);
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_19, "Using default value...");
temp = KDefaultPukEntryAttempts;
}
iSecurityCodeRemainigAttempts.iPuk1=temp;
@@ -220,14 +225,14 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,temp);
if(ret!=KErrNone)
{
- LOGPARSERR(&KSecurityCodeAttempts,ret,3,&KSecurityCodeAttempts);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_20, "WARNING - CONFIGURATION FILE PARSING - Reading element SECURITYCODEATTEMPTS returned %d (element no. %d) from tag %s." ,ret,3,KSecurityCodeAttempts);
}
else
{
if (temp <= 0)
{
- LOGPARSERRANGE(&KSecurityCodeAttempts,temp,"> 0",3,&KSecurityCodeAttempts);
- LOGCONFIG1("Using default value...");
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_21, "Reading element SECURITYCODEATTEMPTS returned %d (element no. %d) from tag %s expected > 0" ,temp,3,KSecurityCodeAttempts);
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_22, "Using default value...");
temp = KDefaultPukEntryAttempts;
}
iSecurityCodeRemainigAttempts.iPuk2=temp;
@@ -236,7 +241,7 @@
}
else
{
- LOGPHONE2("NOTE tag %S not defined, using default values",&KSecurityCodeAttempts);
+ OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_23, "NOTE tag %s not defined, using default values",KSecurityCodeAttempts);
iSecurityCodeDefaultRemainigAttempts.iPin1= KDefaultPinEntryAttempts;
iSecurityCodeRemainigAttempts.iPin1= iSecurityCodeDefaultRemainigAttempts.iPin1;
iSecurityCodeDefaultRemainigAttempts.iPin2= KDefaultPinEntryAttempts;
@@ -255,7 +260,7 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,temp);
if(ret!=KErrNone)
{
- LOGPARSERR("temp",ret,0,&KICCLockedAtStart);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_24, "WARNING - CONFIGURATION FILE PARSING - Reading element TEMP returned %d (element no. %d) from tag %s.",ret,0,KICCLockedAtStart);
}
else
{
@@ -265,7 +270,7 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,temp);
if(ret!=KErrNone)
{
- LOGPARSERR("temp",ret,1,&KICCLockedAtStart);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_25, "WARNING - CONFIGURATION FILE PARSING - Reading element TEMP returned %d (element no. %d) from tag %s.",ret,1,KICCLockedAtStart);
}
else
{
@@ -275,7 +280,7 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,temp);
if(ret!=KErrNone)
{
- LOGPARSERR("temp",ret,2,&KICCLockedAtStart);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_26, "WARNING - CONFIGURATION FILE PARSING - Reading element TEMP returned %d (element no. %d) from tag %s.",ret,2,KICCLockedAtStart);
}
else
{
@@ -285,7 +290,7 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,temp);
if(ret!=KErrNone)
{
- LOGPARSERR("temp",ret,3,&KICCLockedAtStart);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_27, "WARNING - CONFIGURATION FILE PARSING - Reading element TEMP returned %d (element no. %d) from tag %s.",ret,3,KICCLockedAtStart);
}
else
{
@@ -295,7 +300,7 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,temp);
if(ret!=KErrNone)
{
- LOGPARSERR("temp",ret,4,&KICCLockedAtStart);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_28, "WARNING - CONFIGURATION FILE PARSING - Reading element TEMP returned %d (element no. %d) from tag %s.",ret,4,KICCLockedAtStart);
}
else
{
@@ -305,7 +310,7 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,temp);
if(ret!=KErrNone)
{
- LOGPARSERR("temp",ret,5,&KICCLockedAtStart);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_29, "WARNING - CONFIGURATION FILE PARSING - Reading element TEMP returned %d (element no. %d) from tag %s.",ret,5,KICCLockedAtStart);
}
else
iSecStatus.iSPC=(RMobilePhone::TMobilePhoneLockStatus) temp;
@@ -313,7 +318,7 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,6,temp);
if(ret!=KErrNone)
{
- LOGPARSERR("temp",ret,6,&KICCLockedAtStart);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_30, "WARNING - CONFIGURATION FILE PARSING - Reading element TEMP returned %d (element no. %d) from tag %s.",ret,6,KICCLockedAtStart);
}
else
{
@@ -323,7 +328,7 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,7,temp);
if(ret!=KErrNone)
{
- LOGPARSERR("temp",ret,7,&KICCLockedAtStart);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_31, "WARNING - CONFIGURATION FILE PARSING - Reading element TEMP returned %d (element no. %d) from tag %s.",ret,7,KICCLockedAtStart);
}
else
{
@@ -333,7 +338,7 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,8,temp);
if(ret!=KErrNone)
{
- LOGPARSERR("temp",ret,8,&KICCLockedAtStart);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_32, "WARNING - CONFIGURATION FILE PARSING - Reading element TEMP returned %d (element no. %d) from tag %s.",ret,8,KICCLockedAtStart);
}
else
{
@@ -343,7 +348,7 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,9,temp);
if(ret!=KErrNone)
{
- LOGPARSERR("temp",ret,9,&KICCLockedAtStart);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_33, "WARNING - CONFIGURATION FILE PARSING - Reading element TEMP returned %d (element no. %d) from tag %s.",ret,9,KICCLockedAtStart);
}
else
{
@@ -364,14 +369,14 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,duration);
if(ret!=KErrNone)
{
- LOGPARSERR("duration",ret,0,&KICCStatus);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_34, "WARNING - CONFIGURATION FILE PARSING - Reading element DURATION returned %d (element no. %d) from tag %s.",ret,0,KICCStatus);
continue;
}
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,ICCStatus);
if(ret!=KErrNone)
{
- LOGPARSERR("ICCStatus",ret,1,&KICCStatus);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_35, "WARNING - CONFIGURATION FILE PARSING - Reading element ICCSTATUS returned %d (element no. %d) from tag %s.",ret,1,KICCStatus);
continue;
}
@@ -395,28 +400,28 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,duration);
if(ret!=KErrNone)
{
- LOGPARSERR("duration",ret,0,&KICCSetting);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_36, "WARNING - CONFIGURATION FILE PARSING - Reading element DURATION returned %d (element no. %d) from tag %s.",ret,0,KICCSetting);
continue;
}
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,lock);
if(ret!=KErrNone)
{
- LOGPARSERR("lock",ret,1,&KICCSetting);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_37, "WARNING - CONFIGURATION FILE PARSING - Reading element LOCK returned %d (element no. %d) from tag %s.",ret,1,KICCSetting);
continue;
}
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,lockSetting);
if(ret!=KErrNone)
{
- LOGPARSERR("lockSetting",ret,2,&KICCSetting);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_38, "WARNING - CONFIGURATION FILE PARSING - Reading element LOCKSETTING returned %d (element no. %d) from tag %s.",ret,2,KICCSetting);
continue;
}
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,lockStatus);
if(ret!=KErrNone)
{
- LOGPARSERR("lockStatus",ret,3,&KICCSetting);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CONSTRUCTL_39, "WARNING - CONFIGURATION FILE PARSING - Reading element LOCKSTATUS returned %d (element no. %d) from tag %s.",ret,3,KICCSetting);
continue;
}
@@ -637,7 +642,7 @@
return KDefaultNumberOfSlots;
default:
- LOGPHONE1("CSimPhoneSecurity: Number of Slots error, unknown IPC");
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_NUMBEROFSLOTSL_1, "CSimPhoneSecurity: Number of Slots error, unknown IPC");
User::Leave(KErrNotSupported);
break;
}
@@ -694,7 +699,7 @@
* @return CTestConfigSection a pointer to the configuration file data section
*/
{
- LOGPHONE1(">>CSimPhoneSecurity::CfgFile");
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_CFGFILE_1, ">>CSimPhoneSecurity::CfgFile");
return iPhone->CfgFile();
}
@@ -1418,8 +1423,7 @@
case RMobilePhone::ESPCChanged:
// FALLTHRU
default:
- LOGPHONE4("CSimPhoneSecurity::SecurityEvent %d OOR [%d,%d]",
- aEvent, RMobilePhone::ENoICCFound, RMobilePhone::ESPCChanged);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONESECURITY_SECURITYEVENT_1, "CSimPhoneSecurity::SecurityEvent %d OOR [%d,%d]",aEvent, RMobilePhone::ENoICCFound, RMobilePhone::ESPCChanged);
return;
}