engine/collectionframework/datasource/manager/src/glxcollectionpluginbase.cpp
changeset 48 d0b4e67b3a60
parent 36 6481344a6d67
child 58 383b67fbdb11
--- a/engine/collectionframework/datasource/manager/src/glxcollectionpluginbase.cpp	Fri Jun 11 13:38:23 2010 +0300
+++ b/engine/collectionframework/datasource/manager/src/glxcollectionpluginbase.cpp	Wed Jun 23 18:12:48 2010 +0300
@@ -373,7 +373,7 @@
 EXPORT_C void CGlxCollectionPluginBase::HandleResponse(CMPXMedia* aResponse, CGlxRequest* aRequest, const TInt& aError)
 	{
     TRACER("void CGlxCollectionPluginBase::HandleResponse()");
-	
+    GLX_DEBUG2("CGlxCollectionPluginBase::HandleResponse()() aError=%d", aError);
     if (dynamic_cast<CGlxIdListRequest*>(aRequest))
 	// iRequest is a CGlxIdListRequest
 	    {
@@ -384,8 +384,20 @@
 	else if (dynamic_cast<CGlxThumbnailRequest*>(aRequest))
 	// iRequest is a CGlxThumbnailRequest
         {
- 		iObs->HandleMedia(aResponse, aError); 
-	    }
+        //when IAD update / sisx installation of S60 TNM is done and
+        //photos asks for the thumbnail, the thumbnail manager returns an 
+        //error KErrServerTerminated(-15)/KErrDied(-13) for which the MPX recreates
+        //the collection plugins and reconnects to the MPX server and goes into
+        //a invalid state. After this, the error is not propogated to the Medialist
+        //and no further requests are processed and it keeps returning KErrNotReady(-18)
+        //So, as a HACK we are changing the error code to KErrCompletion(-17), 
+        //for which the MPX collection does not take any action and propogates the error
+        //to the medialist. This error(KErrCompletion) is treated as a temporary error
+        //and the thumbnail request is made again from the medialist for which the
+        //S60 TNM returns the thumbnail properly.
+        iObs->HandleMedia(aResponse, ((aError == KErrServerTerminated
+                || aError == KErrDied) ? KErrCompletion : aError));
+        }
 	else if (dynamic_cast<CGlxGetRequest*>(aRequest))
 	// iRequest is a CGlxGetRequest
         {