diff -r 6752808b2036 -r 646a02f170b9 metadataengine/server/src/mdsdiskspacenotifier.cpp --- a/metadataengine/server/src/mdsdiskspacenotifier.cpp Fri Feb 19 23:14:48 2010 +0200 +++ b/metadataengine/server/src/mdsdiskspacenotifier.cpp Fri Mar 12 15:44:28 2010 +0200 @@ -57,7 +57,13 @@ switch( status ) { case KErrNone: - iFileServerSession.Volume( volumeInfo, iDrive ); + { + const TInt error = iFileServerSession.Volume( volumeInfo, iDrive ); + if( error != KErrNone ) + { + StartNotifier(); + break; + } // Check if free space is less than threshold level if( volumeInfo.iFree < iThreshold ) @@ -78,6 +84,7 @@ } StartNotifier(); break; + } case KErrArgument: User::Leave( status ); @@ -89,8 +96,15 @@ else if ( iState == CMdSDiskSpaceNotifierAO::EIterate ) { const TInt KMaxIterations = 10; - - iFileServerSession.Volume( volumeInfo, iDrive ); + TInt error = iFileServerSession.Volume( volumeInfo, iDrive ); + if( error != KErrNone ) + { + iState = ENormal; + iIterationCount = 0; + StartNotifier(); + return; + } + if ( volumeInfo.iFree < iThreshold ) { iObserver.HandleDiskSpaceNotificationL( MMdSDiskSpaceNotifierObserver::ELess ); @@ -104,7 +118,14 @@ } else { - iFileServerSession.Volume( volumeInfo, iDrive ); + error = iFileServerSession.Volume( volumeInfo, iDrive ); + if( error != KErrNone ) + { + iState = ENormal; + iIterationCount = 0; + StartNotifier(); + return; + } if ( volumeInfo.iFree >= iThreshold ) { iDiskFull = EFalse; @@ -155,8 +176,8 @@ User::LeaveIfError( iFileServerSession.Connect( KMessageSlotCount ) ); TVolumeInfo volumeInfo; - iFileServerSession.Volume( volumeInfo, iDrive ); - if ( volumeInfo.iFree < iThreshold ) + const TInt error = iFileServerSession.Volume( volumeInfo, iDrive ); + if ( (error != KErrNone) || volumeInfo.iFree < iThreshold ) { iDiskFull = ETrue; }