--- a/contentstorage/srvsrc/casrv.cpp Fri Apr 30 15:22:08 2010 +0300
+++ b/contentstorage/srvsrc/casrv.cpp Fri May 14 17:24:44 2010 +0300
@@ -154,12 +154,14 @@
iSessionCount = 0;
iStorageProxy = CCaStorageProxy::NewL();
iSrvEngUtils = CCaSrvEngUtils::NewL();
- TRAPD( err, iSrvManager = CCaSrvManager::NewL(
- *iStorageProxy, iSrvEngUtils ) );
- if( KSqlErrNotDb <= err && err <= KSqlErrGeneral )
+ iSrvManager = CCaSrvManager::NewL(*iStorageProxy, iSrvEngUtils);
+ TInt errCode = iSrvManager->LoadOperationErrorCodeL();
+ if( KSqlErrNotDb <= errCode && errCode <= KSqlErrGeneral )
{
//problem in loading one of plugins, probably data base is corrupted
//lets load it from ROM and try again
+ delete iSrvManager;
+ iSrvManager = NULL;
iStorageProxy->LoadDataBaseFromRomL();
iSrvManager = CCaSrvManager::NewL( *iStorageProxy, iSrvEngUtils );
}