userlibandfileserver/fileserver/sfile/sf_thread.cpp
changeset 2 4122176ea935
parent 0 a41df078684a
child 4 56f325a607ea
--- a/userlibandfileserver/fileserver/sfile/sf_thread.cpp	Mon Oct 19 15:55:17 2009 +0100
+++ b/userlibandfileserver/fileserver/sfile/sf_thread.cpp	Mon Dec 21 16:14:42 2009 +0000
@@ -595,9 +595,13 @@
 			iRequest->Process();
 
 		if(iExit)
-			break;
+		    {
+		    //Any requests that sneaked on to
+		    //the queue are cancelled in 
+		    //CRequestThread::ThreadFunction()
+		    break;
+		    }
 		}
-
 	}
 
 void CRequestThread::Deliver(CFsRequest* aRequest,TBool aIsFront, TBool aLowPriority)
@@ -647,8 +651,6 @@
 			iList.AddLast(*aRequest);
 		iListLock.Signal();
 		}
-
-
 	}
 
 void CRequestThread::DeliverFront(CFsRequest* aRequest)
@@ -922,8 +924,14 @@
 	{
 	/** @prototype */
 	iOperationLock.Close();
+	iPlugin.Open();
 	}
 
+CPluginThread::~CPluginThread()
+    {
+    iPlugin.Close();
+    }
+
 
 CPluginThread* CPluginThread::NewL(CFsPlugin& aPlugin)
 	{
@@ -954,7 +962,7 @@
 
 void CPluginThread::CompleteSessionRequests(CSessionFs* aSession, TInt aValue)
 	{
-	__THRD_PRINT(_L("CPluginThread::CompleteSessionReqeusts()"));
+	__THRD_PRINT(_L("CPluginThread::CompleteSessionRequests()"));
 	iListLock.Wait();
 	TDblQueIter<CFsRequest> q(iList);
 	CFsRequest* pR;