--- a/userlibandfileserver/fileserver/sfile/sf_plugin_ops.cpp Tue Aug 31 16:34:26 2010 +0300
+++ b/userlibandfileserver/fileserver/sfile/sf_plugin_ops.cpp Wed Sep 01 12:34:56 2010 +0100
@@ -153,7 +153,7 @@
if(pF->IsDriveSupported(drive) == EFalse)
return KErrNotSupported;
- FsPluginManager::ReadLockChain();
+ FsPluginManager::LockChain();
err = FsPluginManager::IsInChain(pF->UniquePosition(),aRequest->Message().Int2(),aRequest->Message().Int1(), pF);
// plugin might have been mounted in different pos and drive. Find the right one
@@ -209,7 +209,7 @@
TInt drive = aRequest->Message().Int1();
- FsPluginManager::WriteLockChain();
+ FsPluginManager::LockChain();
TInt err = FsPluginManager::IsInChain(pF->UniquePosition(),aRequest->Message().Int2(),drive, pF);
if(err >= 0)
@@ -219,8 +219,11 @@
err = FsPluginManager::Plugin(plugin, pos);
if(err == KErrNone)
{
- FsPluginManager::DismountPlugin(*pF,pos);
- aRequest->SetScratchValue(0);
+ if(aRequest->iCurrentPlugin == plugin)
+ {
+ FsPluginManager::DismountPlugin(*pF,pos);
+ aRequest->SetScratchValue(0);
+ }
}
}
FsPluginManager::UnlockChain();
@@ -247,7 +250,7 @@
TInt TFsPluginName::DoRequestL(CFsRequest* aRequest)
{
CFsPlugin* plugin=NULL;
- FsPluginManager::ReadLockChain();
+ FsPluginManager::LockChain();
TInt err = FsPluginManager::Plugin(plugin, aRequest->Message().Int2());
if(err != KErrNone) //should be ok but just in case
{