userlibandfileserver/fileserver/sfile/sf_thread.cpp
changeset 281 13fbfa31d2ba
parent 201 43365a9b78a3
child 271 dc268b18d709
--- a/userlibandfileserver/fileserver/sfile/sf_thread.cpp	Fri Sep 17 08:37:04 2010 +0300
+++ b/userlibandfileserver/fileserver/sfile/sf_thread.cpp	Mon Oct 04 02:35:35 2010 +0300
@@ -928,25 +928,24 @@
 CPluginThread::CPluginThread(CFsPlugin& aPlugin, RLibrary aLibrary)
   : iPlugin(aPlugin), iLib(aLibrary)
 	{
-	/** @prototype */
-	iOperationLock.Close();
 	iPlugin.Open();
 	
-    /* 
-    Duplicate the handle to the DLL which created the plugin to prevent 
-    TFsRemovePlugin::DoRequestL() from unmapping the DLL's code segment before
-    this thread's destructor has been called as the destructor closes the plugin 
-    which results in a call to the plugin's derived destructor contained in the DLL (!)
-    */ 
-    TInt r = iLib.Duplicate(iThread, EOwnerProcess);
-    __ASSERT_ALWAYS(r==KErrNone, Fault(EFsThreadConstructor));
+	/* 
+	Duplicate the handle to the DLL which created the plugin to prevent 
+	TFsRemovePlugin::DoRequestL() from unmapping the DLL's code segment before
+	this thread's destructor has been called as the destructor closes the plugin 
+	which results in a call to the plugin's derived destructor contained in the DLL (!)
+	*/ 
+	TInt r = iLib.Duplicate(iThread, EOwnerProcess);
+	__ASSERT_ALWAYS(r==KErrNone, Fault(EFsThreadConstructor));
 	}
 
 CPluginThread::~CPluginThread()
-    {
-    iPlugin.Close();
+	{
+	iPlugin.Close();
 	iLib.Close();
-    }
+	iOperationLock.Close();
+	}
 
 
 CPluginThread* CPluginThread::NewL(CFsPlugin& aPlugin, RLibrary aLibrary)
@@ -955,7 +954,6 @@
 	CPluginThread* pT=new(ELeave) CPluginThread(aPlugin, aLibrary);
 	TInt r=pT->Initialise();
 
-	/** @prototype */
 	if(r == KErrNone)
 		r=pT->iOperationLock.CreateLocal(0);