diff -r 82c0024438c8 -r ab88d4a85041 harvester/blacklistclient/src/blacklistclient.cpp --- a/harvester/blacklistclient/src/blacklistclient.cpp Wed Apr 14 16:24:03 2010 +0300 +++ b/harvester/blacklistclient/src/blacklistclient.cpp Tue Apr 27 17:05:23 2010 +0300 @@ -43,6 +43,7 @@ iBlacklistMemoryTable.ResetAndDestroy(); iBlacklistMemoryTable.Close(); iBlacklistChunk.Close(); + iFs.Close(); WRITELOG( "RBlacklistClient::~RBlacklistClient - end" ); } @@ -56,8 +57,15 @@ WRITELOG( "RBlacklistClient::Connect - begin" ); iSessionOk = EFalse; + + TInt error = iFs.Connect(); + + if( error != KErrNone ) + { + return error; + } - TInt error = StartServer(); + error = StartServer(); if ( error == KErrNone || error == KErrAlreadyExists ) { @@ -69,6 +77,10 @@ { iSessionOk = ETrue; } + else + { + iFs.Close(); + } WRITELOG( "RBlacklistClient::Connect - end" ); @@ -273,19 +285,35 @@ // RBlacklistClient::IsBlacklistedL() // --------------------------------------------------------------------------- // -EXPORT_C TBool RBlacklistClient::IsBlacklistedL( const TDesC& aUri, TUint32 aMediaId, TTime aLastModifiedTime ) +EXPORT_C TBool RBlacklistClient::IsBlacklistedL( const TDesC& aUri, TUint32 aMediaId, TTime /*aLastModifiedTime*/ ) { WRITELOG( "RBlacklistClient::IsBlacklistedL - begin" ); + if ( !iSessionOk ) + { + return EFalse; + } + const TInt index = GetListIndex( aUri, aMediaId ); if ( index >= 0 ) { + TEntry entry; + const TInt errorcode = iFs.Entry( aUri, entry ); + + if ( errorcode != KErrNone ) + { + return EFalse; + } + + TTime fileLastModified( 0 ); + fileLastModified = entry.iModified; + TInt64 modified( 0 ); modified = iBlacklistMemoryTable[index]->Modified(); if( modified > 0 ) { - if ( modified == aLastModifiedTime.Int64() ) + if ( modified == fileLastModified.Int64() ) { WRITELOG( "RBlacklistClient::IsBlacklistedL - file is blacklisted, modification time is the same" ); return ETrue;