diff -r f0aa341a25bf -r ff2fb7658ff7 imagehandlingutilities/thumbnailmanager/thumbagdaemon/src/thumbagdaemon.cpp --- a/imagehandlingutilities/thumbnailmanager/thumbagdaemon/src/thumbagdaemon.cpp Wed Jun 09 10:01:32 2010 +0300 +++ b/imagehandlingutilities/thumbnailmanager/thumbagdaemon/src/thumbagdaemon.cpp Mon Jun 21 16:00:46 2010 +0300 @@ -120,6 +120,7 @@ // create processor if(iProcessor) { + iProcessor->Shutdown(); delete iProcessor; iProcessor = NULL; } @@ -179,6 +180,7 @@ if (iProcessor) { + iProcessor->Shutdown(); delete iProcessor; iProcessor = NULL; } @@ -281,26 +283,24 @@ void CThumbAGDaemon::HandleSessionError( CMdESession& /*aSession*/, TInt aError ) { TN_DEBUG2( "CThumbAGDaemon::HandleSessionError == %d", aError ); - if (aError != KErrNone && !iSessionError) + if (aError != KErrNone && !iShutdown && !iSessionError) { iSessionError = ETrue; // kill processor right away, because it also has MdESession if(iProcessor) { + iProcessor->Shutdown(); delete iProcessor; iProcessor = NULL; } - if (!iShutdown) + if (!iReconnect->IsActive()) { - if (!iReconnect->IsActive()) - { - iReconnect->Start( KMdEReconnect, KMdEReconnect, - TCallBack(ReconnectCallBack, this)); - - TN_DEBUG1( "CThumbAGDaemon::HandleSessionError() - reconnect timer started" ); - } + iReconnect->Start( KMdEReconnect, KMdEReconnect, + TCallBack(ReconnectCallBack, this)); + + TN_DEBUG1( "CThumbAGDaemon::HandleSessionError() - reconnect timer started" ); } } @@ -319,6 +319,11 @@ { TN_DEBUG1( "CThumbAGDaemon::HandleUriObjectNotification() - begin" ); + if(!iProcessor || iShutdown) + { + return; + } + if(aType == ENotifyRemove) { TN_DEBUG1( "CThumbAGDaemon::HandleUriObjectNotification() - removed");