diff -r ffb2d5dd62e9 -r ad31f4183ddc imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailserver.cpp --- a/imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailserver.cpp Tue May 11 16:30:11 2010 +0300 +++ b/imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailserver.cpp Tue May 25 13:01:47 2010 +0300 @@ -224,6 +224,7 @@ // connect to MDS iMdESession = CMdESession::NewL( *this ); + iSessionError = EFalse; User::LeaveIfError( iFbsSession.Connect()); User::LeaveIfError( Start( KThumbnailServerName )); @@ -329,8 +330,10 @@ void CThumbnailServer::HandleSessionError( CMdESession& /*aSession*/, TInt aError ) { TN_DEBUG2( "CThumbnailServer::HandleSessionError == %d", aError ); - if (aError != KErrNone && !iShutdown) + if (aError != KErrNone && !iShutdown && !iSessionError) { + iSessionError = ETrue; + if (!iReconnect->IsActive()) { iReconnect->Start( KMdEReconnect, KMdEReconnect, @@ -425,17 +428,15 @@ const TThumbnailBitmapRef* ref = bpiter.NextValue(); while ( ref ) - { + { + if ( ref->iSession == aSession ) + { + TN_DEBUG2( "CThumbnailServer::DropSession() - ref->iSession = 0x%08x", ref->iSession ); - TN_DEBUG2( "CThumbnailServer::DropSession() - ref->iSession = 0x%08x", ref->iSession ); - - if ( ref->iSession == aSession ) - { delete ref->iBitmap; bpiter.RemoveCurrent(); - TN_DEBUG2( "CThumbnailServer::DropSession() - deleted bitmap, left=%d", - iBitmapPool.Count()); + TN_DEBUG2( "CThumbnailServer::DropSession() - deleted bitmap, left=%d", iBitmapPool.Count()); } ref = bpiter.NextValue(); @@ -1320,6 +1321,10 @@ { aMimeType = TDataType( KVideo3gppMime ); } + else if ( ext.CompareF( K3gppExt ) == 0 ) + { + aMimeType = TDataType( KVideo3gppMime ); + } else if ( ext.CompareF( KAmrExt ) == 0 ) { aMimeType = TDataType( KAudioAmrMime ); @@ -1628,6 +1633,7 @@ // reconnect to MDS TRAP_IGNORE( self->iMdESession = CMdESession::NewL( *self ) ); + self->iSessionError = EFalse; TN_DEBUG1( "CThumbAGDaemon::ReconnectCallBack() - done");