--- a/cellular/SSSettings/src/RCustomerServiceProfileCache.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/SSSettings/src/RCustomerServiceProfileCache.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,13 +19,13 @@
// INCLUDE FILES
#include <bldvariant.hrh> // for feature definitions
#include <etel.h>
-#include <SSSettingsPrivatePSKeys.h>
+#include <SSSettingsPrivatePSKeys.h>
#include <centralrepository.h>
#include <mmtsy_names.h>
#include <featmgr.h>
-#include "RCustomerServiceProfileCache.h"
-#include "SSSettingsLogger.h"
+#include "rcustomerserviceprofilecache.h"
+#include "SSSettingsLogger.h"
// CONSTANTS
#define KSSSettingsTSYName KMmTsyModuleName
@@ -80,8 +80,8 @@
// Constructor
// -----------------------------------------------------------------------------
EXPORT_C RCustomerServiceProfileCache::RCustomerServiceProfileCache()
- :iData( NULL ),iOldCspFile(NULL)
{
+ iData = NULL;
}
// -----------------------------------------------------------------------------
@@ -119,8 +119,6 @@
__SSSLOGSTRING("[SSS]--> RCustomerServiceProfileCache::Close");
if ( iData == NULL )
{
- delete iOldCspFile;
- iOldCspFile = NULL;
return;
}
@@ -462,12 +460,7 @@
}
User::LeaveIfError(
CspCacheDoOpenEtelConnection( iData->iEtel, iData->iPhone ) );
-
- if( iOldCspFile )
- {
- delete iOldCspFile;
- iOldCspFile = NULL;
- }
+
// Create and reset old CSP file variable.
iOldCspFile = new ( ELeave ) RMobilePhone::TMobilePhoneCspFileV1;
DoResetOldCspFile();
@@ -502,34 +495,34 @@
error = DefineAndSetValue( KPSUidSSConfig, KSettingsCspCache1, value );
}
else if ( error == KErrNotFound && aGroup == ESsCspGroup2 )
- {
- error = DefineAndSetValue( KPSUidSSConfig, KSettingsCspCache2, value );
- }
+ {
+ error = DefineAndSetValue( KPSUidSSConfig, KSettingsCspCache2, value );
+ }
if ( error == KErrNone )
{
if ( value != KCspCacheNoFile )
- {
- __SSSLOGSTRING("[SSS] ---> GetCustomerServiceProfile");
- TRequestStatus status;
- // GetCustomerServiceProfile status returns KErrNotFound if CSP product profile is OFF.
- iData->iPhone.GetCustomerServiceProfile(
- status ,
- iData->iCspFilePckg );
- User::WaitForRequest( status );
- error = status.Int();
- __SSSLOGSTRING1("[SSS] <--- GetCustomerServiceProfile: error: %d", error);
-
- if (( error == KErrNotReady ) || ( error == KErrServerBusy ))
- {
- return error;
- }
- }
+ {
+ __SSSLOGSTRING("[SSS] ---> GetCustomerServiceProfile");
+ TRequestStatus status;
+ // GetCustomerServiceProfile status returns KErrNotFound if CSP product profile is OFF.
+ iData->iPhone.GetCustomerServiceProfile(
+ status ,
+ iData->iCspFilePckg );
+ User::WaitForRequest( status );
+ error = status.Int();
+ __SSSLOGSTRING1("[SSS] <--- GetCustomerServiceProfile: error: %d", error);
+
+ if (( error == KErrNotReady ) || ( error == KErrServerBusy ))
+ {
+ return error;
+ }
+ }
else // CSP has been read return value, if value is KCspCacheNoFile then return KErrNotSupported.
- {
- __SSSLOGSTRING("[SSS] CSP file cannot be found from SIM");
- return KErrNotSupported;
- }
+ {
+ __SSSLOGSTRING("[SSS] CSP file cannot be found from SIM");
+ return KErrNotSupported;
+ }
if ( error == KErrNone )
{
@@ -565,7 +558,7 @@
}
else
{
- value = KCspCacheNoFile;
+ value = KCspCacheNoFile;
error = KErrNotSupported;
}
}
@@ -585,10 +578,10 @@
}
// Do not set error if defError is KErrNone. If Define/Set failed then error value is set.
- if ( defError != KErrNone )
- {
- error = defError;
- }
+ if ( defError != KErrNone )
+ {
+ error = defError;
+ }
}
__SSSLOGSTRING1("[SSS] RCustomerServiceProfileCache::DoGetValues: error: %d", error);