--- a/metadataengine/server/src/mdsmanipulationengine.cpp Fri Jul 23 10:03:59 2010 +0300
+++ b/metadataengine/server/src/mdsmanipulationengine.cpp Fri Aug 06 09:56:02 2010 +0300
@@ -155,7 +155,7 @@
CleanupClosePushL(objStmt);
RMdSTransaction transaction( connection );
- CleanupClosePushL(transaction);
+ CleanupClosePushL (transaction );
const TInt beginError( transaction.Error() );
if( beginError != KErrNone )
{
@@ -1074,13 +1074,19 @@
CMdSSqLiteConnection& connection = MMdSDbConnectionPool::GetDefaultDBL();
RMdSTransaction transaction( connection );
CleanupClosePushL( transaction );
- User::LeaveIfError( transaction.Error() );
+ const TInt beginError( transaction.Error() );
+ if( beginError != KErrNone )
+ {
+ CleanupStack::PopAndDestroy( &transaction );
+ }
iManipulate->CheckMassStorageMediaIdL( aMediaId );
- transaction.CommitL();
-
- CleanupStack::PopAndDestroy( &transaction );
+ if( beginError == KErrNone )
+ {
+ transaction.CommitL();
+ CleanupStack::PopAndDestroy( &transaction );
+ }
}
void CMdSManipulationEngine::AddRelationDefL( TDefId aNamespaceId, const TDesC& aRelationDefName )