diff -r 28ae839b4c09 -r ff168ad79dda messagingfw/msgsrvnstore/server/src/MSVSERV.CPP --- a/messagingfw/msgsrvnstore/server/src/MSVSERV.CPP Tue Feb 02 10:12:21 2010 +0200 +++ b/messagingfw/msgsrvnstore/server/src/MSVSERV.CPP Fri Apr 16 15:27:42 2010 +0300 @@ -251,7 +251,7 @@ CMsvServer::CMsvServer(TInt aPriority, TBool aDebug) -: CPolicyServer(aPriority, msgServerPolicy), iSessionNumber(1), iMtmOperationQueueArray(KMsvMtmOpsQueueArrayGranularity), iDebug(aDebug) +: CPolicyServer(aPriority, msgServerPolicy), iSessionNumber(1), iMtmOperationQueueArray(KMsvMtmOpsQueueArrayGranularity), iDebug(aDebug), iReleasedForRestore(EFalse) // // // @@ -2015,15 +2015,6 @@ iStartupState = EMsvMediaUnavailable; drive = iSystemDrive; } - else if (iNewContext->Config().iUniqueID != 0 && iNewContext->Config().iUniqueID != volume.iUniqueID) - { -#ifndef _NO_SERVER_LOGGING_ - Log(_L("The media is incorrect %d != %d - using default"), iNewContext->Config().iUniqueID, volume.iUniqueID); -#endif - // The media is incorrect - use default - iStartupState = EMsvMediaIncorrect; - drive = iSystemDrive; - } iNewContext->CreateIndexL(drive, aSync); return; } @@ -2277,8 +2268,14 @@ #ifndef _NO_SERVER_LOGGING_ Log(_L("Disk %d removed"), TInt(aDrive)); #endif - - NotifyChanged(EMsvMediaUnavailable, KMsvNullIndexEntryId, TInt(aDrive)); + if(iContext->IndexAdapter()->ErrorState() != KMsvIndexRestore) + { + NotifyChanged(EMsvMediaUnavailable, KMsvNullIndexEntryId, TInt(aDrive)); + } + else + { + iReleasedForRestore = ETrue; + } iContext->IndexAdapter()->SetErrorState(KMsvMediaUnavailable); iContext->IndexAdapter()->DeleteDbAdapter(); @@ -2296,8 +2293,14 @@ #ifndef _NO_SERVER_LOGGING_ Log(_L("Disk %d inserted"), TInt(aDrive)); #endif - - NotifyChanged(EMsvMediaAvailable, KMsvNullIndexEntryId, TInt(aDrive)); + if(!iReleasedForRestore) + { + NotifyChanged(EMsvMediaAvailable, KMsvNullIndexEntryId, TInt(aDrive)); + } + else + { + iReleasedForRestore = EFalse; + } iContext->IndexAdapter()->SetErrorState(KErrNone); @@ -3564,6 +3567,7 @@ // if an operation is already running, queue this one if (opRunning) { + aOperation.SetCapability(hasCapability); QueueOperationL(aOperation, aSessionId); return; } @@ -3742,7 +3746,8 @@ return; } } - aQueue->At(0)->Start(*aQueue->iMtm, EFalse); + + aQueue->At(0)->Start(*aQueue->iMtm, aQueue->At(0)->Capability()); aQueue->At(0)->SetState(EMsvOperationRunning); }