telephonyserverplugins/common_tsy/commontsy/src/mmstorage/cmmphonebookstoretsy.cpp
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmstorage/cmmphonebookstoretsy.cpp Wed Mar 31 23:24:02 2010 +0300
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmstorage/cmmphonebookstoretsy.cpp Wed Apr 14 17:11:46 2010 +0300
@@ -660,20 +660,13 @@
// Reset initialization value
iStoreInfoData->iIsPhonebookInitialized = ETrue;
iStoreInfoData->iIsPhonebookInitializeFailed = EFalse;
- // Set initialization flag for all phonebooks
- for( TInt i = 0; i < iMmPhoneTsy->PBList()->GetNumberOfObjects(); i++ )
- {
- //Get pbStore object
- CMmPhoneBookStoreTsy* pbStore = iMmPhoneTsy->PBList()->GetMmPBByIndex( i );
- pbStore->iIsPBInitCompleted = ETrue;
- pbStore->iInitError = aResult;
- // Set max name & number length for the current phonebook
- pbStore->SetMaxNameAndNumLenght();
- // Just in case here, if cache request has been come
- // before initialization is finished.
- pbStore->CacheEntriesL();
- }
- }
+ iIsPBInitCompleted = ETrue;
+ iInitError = aResult;
+ SetMaxNameAndNumLenght();
+ // Just in case here, if cache request has been come
+ // before initialization is finished.
+ CacheEntriesL();
+ }
else
//Initialisation has failed
{
@@ -699,32 +692,34 @@
iStoreInfoData->iIsPhonebookInitializeFailed = ETrue;
}
}
- if( iStoreInfoData->iIsPhonebookInitialized )
+
+
+ if( iStoreInfoData->iIsPhonebookInitialized )
+ {
+ TTsyReqHandle getInfoHandle =
+ iTsyReqHandleStore->ResetTsyReqHandle( EMultimodePhoneStoreGetInfo );
+ if ( EMultimodePhoneBookStoreReqHandleUnknown != getInfoHandle )
{
- TTsyReqHandle getInfoHandle =
- iTsyReqHandleStore->ResetTsyReqHandle( EMultimodePhoneStoreGetInfo );
- if ( EMultimodePhoneBookStoreReqHandleUnknown != getInfoHandle )
+ iReqHandleType = EMultimodePhoneBookStoreReqHandleUnknown;
+ RMobilePhoneBookStore::TMobilePhoneBookInfoV1Pckg info(*iPhoneBookInfoChanged);
+ TInt result = GetInfoL(getInfoHandle, &info);
+ if ( KErrNone != result )
{
- iReqHandleType = EMultimodePhoneBookStoreReqHandleUnknown;
- RMobilePhoneBookStore::TMobilePhoneBookInfoV1Pckg info(*iPhoneBookInfoChanged);
- TInt result = GetInfoL(getInfoHandle, &info);
- if ( KErrNone != result )
- {
- ReqCompleted( getInfoHandle, result );
- }
- // Save request handle
- if ( EMultimodePhoneBookStoreReqHandleUnknown != iReqHandleType )
- {
+ ReqCompleted( getInfoHandle, result );
+ }
+ // Save request handle
+ if ( EMultimodePhoneBookStoreReqHandleUnknown != iReqHandleType )
+ {
#ifdef REQHANDLE_TIMER
- SetTypeOfResponse( iReqHandleType, getInfoHandle );
+ SetTypeOfResponse( iReqHandleType, getInfoHandle );
#else
- iTsyReqHandleStore->SetTsyReqHandle( iReqHandleType, getInfoHandle );
+ iTsyReqHandleStore->SetTsyReqHandle( iReqHandleType, getInfoHandle );
#endif
- }
-
}
+
}
- iMmPhoneTsy->PhoneBookStoreInitCompleteL(iInitError);
+ }
+ iMmPhoneTsy->PhoneBookStoreInitCompleteL(iInitError);
}