--- a/harvester/common/src/harvesterplugin.cpp Thu Jul 15 19:07:24 2010 +0300
+++ b/harvester/common/src/harvesterplugin.cpp Thu Aug 19 10:20:41 2010 +0300
@@ -144,13 +144,13 @@
{
if( iQueue->Count() == 0 )
{
- SetNextRequest( EHarvesterIdle );
if( iHarvesting )
{
TRAP_IGNORE( iFactory->SendHarvestingStatusEventL( EFalse ) );
iHarvesting = EFalse;
}
iQueue->Compress();
+ SetNextRequest( EHarvesterIdle );
}
else
{
@@ -162,6 +162,11 @@
CHarvesterData* hd = (*iQueue)[0];
iQueue->Remove( 0 );
+ if( !hd )
+ {
+ SetNextRequest( EHarvesterGathering );
+ break;
+ }
const TDesC& uri = hd->Uri();
TUint32 mediaId = hd->MdeObject().MediaId();
@@ -194,7 +199,7 @@
TRAP_IGNORE( SetDefaultPropertiesL( *hd ) );
WRITELOG1("CHarvesterPlugin::RunL - Calling HarvestL for file: %S", &uri);
- TRAPD(err, HarvestL( hd ) );
+ TRAPD( err, HarvestL( hd ) );
if ( iBlacklist )
{