userlibandfileserver/fileserver/sfile/sf_plugin_ops.cpp
changeset 247 d8d70de2bd36
parent 200 73ea206103e6
child 257 3e88ff8f41d5
--- a/userlibandfileserver/fileserver/sfile/sf_plugin_ops.cpp	Tue Jul 06 15:50:07 2010 +0300
+++ b/userlibandfileserver/fileserver/sfile/sf_plugin_ops.cpp	Wed Aug 18 11:08:29 2010 +0300
@@ -153,7 +153,7 @@
 	if(pF->IsDriveSupported(drive) == EFalse)
 		return KErrNotSupported;
 
-	FsPluginManager::LockChain();
+	FsPluginManager::ReadLockChain();
 	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::LockChain();
+	FsPluginManager::WriteLockChain();
 
 	TInt err = FsPluginManager::IsInChain(pF->UniquePosition(),aRequest->Message().Int2(),drive, pF);
 	if(err >= 0)
@@ -219,11 +219,8 @@
 		err = FsPluginManager::Plugin(plugin, pos);
 		if(err == KErrNone)
 			{
-			if(aRequest->iCurrentPlugin == plugin)
-				{
-				FsPluginManager::DismountPlugin(*pF,pos);
-				aRequest->SetScratchValue(0);
-				}
+			FsPluginManager::DismountPlugin(*pF,pos);
+			aRequest->SetScratchValue(0);
 			}
 		}
 	FsPluginManager::UnlockChain();
@@ -250,7 +247,7 @@
 TInt TFsPluginName::DoRequestL(CFsRequest* aRequest)
 	{
 	CFsPlugin* plugin=NULL;
-	FsPluginManager::LockChain();
+	FsPluginManager::ReadLockChain();
 	TInt err = FsPluginManager::Plugin(plugin, aRequest->Message().Int2());
 	if(err != KErrNone) //should be ok but just in case
 	    {