messagingfw/msgsrvnstore/server/src/MSVSESS.CPP
changeset 15 ff168ad79dda
parent 0 8e480a14352b
child 31 b9e74fff3740
child 34 b66b8f3a7fd8
child 35 f8ad95794a08
--- a/messagingfw/msgsrvnstore/server/src/MSVSESS.CPP	Tue Feb 02 10:12:21 2010 +0200
+++ b/messagingfw/msgsrvnstore/server/src/MSVSESS.CPP	Fri Apr 16 15:27:42 2010 +0300
@@ -3112,6 +3112,16 @@
  ****************************************/ 
 void CMsvServerSession::SearchSortOnHeaderAndBodytMsgL(const RMessage2& aMessage)
 	{
+	//For Simultaneously query
+	if(CMSvSearchSortCacheManager::Instance()->OutstandingSOSOperations() > 0)
+       		{
+			if(CMSvSearchSortCacheManager::Instance()->iProgress != KMsvSearchSortOpCompleted)
+				{
+				User::Leave(KErrServerBusy); // One is SOS request is under proress.
+				}
+       		}
+	CMSvSearchSortCacheManager::Instance()->AddOutstandingSOSOperation();
+
 	//Header and body.
 	TMsvOp operationId = aMessage.Int0();
 		
@@ -3171,6 +3181,16 @@
 
 void CMsvServerSession::SearchSortOnIndexEntryL(const RMessage2& aMessage)
 	{
+  	//For Simultaneously query
+   	if(CMSvSearchSortCacheManager::Instance()->OutstandingSOSOperations() > 0)
+       	{
+       	if(CMSvSearchSortCacheManager::Instance()->iProgress != KMsvSearchSortOpCompleted)
+			{
+            User::Leave(KErrServerBusy); // One is SOS request is under proress.
+			}
+       	}
+ 	CMSvSearchSortCacheManager::Instance()->AddOutstandingSOSOperation();
+
 	//Search sort on index entry.
 	// Recover the operation data
 	TMsvOp operationId = aMessage.Int0();
@@ -3480,6 +3500,16 @@
 
 void CMsvServerSession::GetResultForQueryIDL(const RMessage2& aMessage)
 	{
+    //For Simultaneously query
+    if(CMSvSearchSortCacheManager::Instance()->OutstandingSOSOperations() > 0)
+        {
+		if(CMSvSearchSortCacheManager::Instance()->iProgress != KMsvSearchSortOpCompleted )
+			{
+			User::Leave(KErrServerBusy); // One is SOS request is under proress.
+			}
+         }
+    CMSvSearchSortCacheManager::Instance()->AddOutstandingSOSOperation();
+	
 	TInt operationId = aMessage.Int0();
 	TInt queryID = aMessage.Int1();