diff -r 657f875b013e -r 73ea206103e6 userlibandfileserver/fileserver/sfile/sf_plugin_man.cpp --- a/userlibandfileserver/fileserver/sfile/sf_plugin_man.cpp Fri Jun 11 15:02:23 2010 +0300 +++ b/userlibandfileserver/fileserver/sfile/sf_plugin_man.cpp Wed Jun 23 19:44:53 2010 +0300 @@ -162,7 +162,7 @@ return err; } - err = InitPlugin(*pP); + err = InitPlugin(*pP, aPluginFactory.Library()); if(err != KErrNone) { return err; @@ -624,13 +624,13 @@ Create a plugin thread Should only by called from main file server thread with plugin thread unavailable */ -TInt FsPluginManager::InitPlugin(CFsPlugin& aPlugin) +TInt FsPluginManager::InitPlugin(CFsPlugin& aPlugin, RLibrary aLibrary) { TInt err = KErrNone; if(!aPlugin.iThreadP) { - TRAP(err,aPlugin.iThreadP=CPluginThread::NewL(aPlugin)); + TRAP(err,aPlugin.iThreadP=CPluginThread::NewL(aPlugin, aLibrary)); if(err!=KErrNone) return err; } @@ -745,11 +745,12 @@ FsPluginManager::LockChain(); TInt count = FsPluginManager::ChainCount(); + TInt oldCount = count; TInt i; for(i=0; iiCurrentPlugin = plugin; aRequest->Status() = KRequestPending; @@ -761,6 +762,12 @@ FsPluginManager::LockChain(); __ASSERT_ALWAYS(aRequest->Status().Int()==KErrNone||aRequest->Status().Int()==KErrCancel,Fault(ESessionDisconnectThread2)); count = FsPluginManager::ChainCount(); + //If a plugin was removed whilst the chain was unlocked we need to make sure we don't skip any plugins + if(count != oldCount) + { + i=0; + oldCount = count; + } } FsPluginManager::UnlockChain();