imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailmdsquerytask.cpp
changeset 15 7197e789b953
parent 14 2edacbf5d3f9
child 33 221be23823c5
child 36 c5df59b4ae2d
--- a/imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailmdsquerytask.cpp	Fri Mar 19 09:35:30 2010 +0200
+++ b/imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailmdsquerytask.cpp	Fri Apr 16 15:16:16 2010 +0300
@@ -101,7 +101,7 @@
         else
             {
             TN_DEBUG1( "CThumbnailMDSQueryTask::HandleQueryCompleted() - Don't ever come here!" );
-            if (ClientThreadAlive(EFalse))
+            if (ClientThreadAlive())
                 {  
                 Complete( KErrNotFound );
                 ResetMessageData();
@@ -114,7 +114,7 @@
         TN_DEBUG1( "CThumbnailMDSQueryTask::HandleQueryCompleted() - No results." );
         if(!iDelete)
             {
-            if (ClientThreadAlive(EFalse))
+            if (ClientThreadAlive())
                 {  
                 Complete( KErrNotFound );
                 ResetMessageData();
@@ -133,18 +133,18 @@
     TN_DEBUG2( "CThumbnailMDSQueryTask(0x%08x)::StartL()", this );
 
     CThumbnailTask::StartL();
-
-    // get client thread
-    TInt err = iMessage.Client( iClientThread );
-    if (err != KErrNone)
+    
+    if (iMessage.Handle())
         {
-        TN_DEBUG2( "CThumbnailTask(0x%08x)::ClientThreadAlive() - client thread not found", this);
-    
+        // start query
+        iQuery->FindL();
+        }
+    else
+        {
+        // no point to continue
+        Complete( KErrCancel );
         ResetMessageData();
         }
-    
-    // start query
-    iQuery->FindL();
     }
 
 
@@ -198,7 +198,7 @@
 //
 void CThumbnailMDSQueryTask::ReturnPath(const TDesC& aUri)
     {
-    if ( ClientThreadAlive(EFalse) )
+    if ( ClientThreadAlive() )
         {
         // add path to message
         TInt ret = iMessage.Read( 0, iRequestParams );