--- a/harvester/monitorplugins/mmcplugin/src/mmcmounttaskao.cpp Tue Aug 31 15:37:30 2010 +0300
+++ b/harvester/monitorplugins/mmcplugin/src/mmcmounttaskao.cpp Wed Sep 01 12:24:24 2010 +0100
@@ -114,25 +114,6 @@
{
WRITELOG("CMMCMountTaskAO::StartMount");
- // Remove pending mount request for the same drive
- // if for example USB cable is pluged and unpluged
- // several times in a row
- for( TInt i = iMountDataQueue.Count() - 1; i >=0; i-- )
- {
- WRITELOG( "CMMCMountTaskAO::StartUnmountL - checking for pending mount notifications" );
- TMountData* tempData = iMountDataQueue[i];
- if( tempData->iMediaID == aMountData.iMediaID &&
- tempData->iMountType == TMountData::EMount &&
- aMountData.iMountType == TMountData::EMount &&
- tempData->iDrivePath == aMountData.iDrivePath )
- {
- WRITELOG( "CMMCMountTaskAO::StartUnmountL - removing obsolite mount notifications" );
- iMountDataQueue.Remove(i);
- delete tempData;
- tempData = NULL;
- }
- }
-
User::LeaveIfError( iMountDataQueue.Append( &aMountData ));
if ( iNextRequest == ERequestIdle )
@@ -154,26 +135,7 @@
Deinitialize();
}
}
-
- // Remove pending unmount request for the same drive
- // if for example USB cable is pluged and unpluged
- // several times in a row
- for( TInt i = iMountDataQueue.Count() - 1; i >=0; i-- )
- {
- WRITELOG( "CMMCMountTaskAO::StartUnmountL - checking for pending unmount notifications" );
- TMountData* tempData = iMountDataQueue[i];
- if( tempData->iMediaID == aMountData.iMediaID &&
- tempData->iMountType == TMountData::EUnmount &&
- aMountData.iMountType == TMountData::EUnmount &&
- tempData->iDrivePath == aMountData.iDrivePath )
- {
- WRITELOG( "CMMCMountTaskAO::StartUnmountL - removing obsolite unmount notifications" );
- iMountDataQueue.Remove(i);
- delete tempData;
- tempData = NULL;
- }
- }
-
+
User::LeaveIfError( iMountDataQueue.Append( &aMountData ));
SetNextRequest( ERequestStartTask );
@@ -219,7 +181,7 @@
WRITELOG1( "iMountData.iMountType: %d", iMountData->iMountType );
WRITELOG1( "iMountData.iDrivePath: %S", &iMountData->iDrivePath );
- WRITELOG1( "iMountData.iMediaID: %u", iMountData->iMediaID );
+ WRITELOG1( "iMountData.iMediaID: %d", iMountData->iMediaID );
if ( iMountData->iMountType == TMountData::EMount )
{
@@ -431,7 +393,6 @@
{
WRITELOG1( "CMMCMountTaskAO::RunError with error code: %d", aError );
Deinitialize();
- SetNextRequest( ERequestStartTask );
return KErrNone;
}
@@ -454,7 +415,7 @@
void CMMCMountTaskAO::SetNotPresentToMDE()
{
- WRITELOG1("CMMCMountTaskAO::SetNotPresentToMDE - MediaID %u", iMountData->iMediaID);
+ WRITELOG1("CMMCMountTaskAO::SetNotPresentToMDE - MediaID %d", iMountData->iMediaID);
if ( iMountData->iMediaID )
{
iMdeSession->SetFilesToNotPresent( iMountData->iMediaID );
@@ -577,7 +538,7 @@
}
}
-TUint32 CMMCMountTaskAO::GetInternalDriveMediaId( TBool& aPresent )
+TUint32 CMMCMountTaskAO::GetInternalDriveMediaId()
{
WRITELOG( "CMMCMountTaskAO::GetInternalDriveMediaId" );
@@ -620,15 +581,10 @@
// check if disk is internal
TUint driveStatus;
const TInt err = DriveInfo::GetDriveStatus( iFs, i, driveStatus );
- if ( ( err == KErrNone ) &&
- ( driveStatus & DriveInfo::EDriveInternal ))
+ if ( (err == KErrNone ) && ( driveStatus & DriveInfo::EDriveInternal ) )
{
// get media id
hdMediaId = FSUtil::MediaID( iFs, i );
- if( driveStatus & DriveInfo::EDrivePresent )
- {
- aPresent = ETrue;
- }
break;
}
}