diff -r 5dae2c62e9b6 -r 68159986cd41 serviceproviders/sapi_logging/src/loggingcallback.cpp --- a/serviceproviders/sapi_logging/src/loggingcallback.cpp Mon Mar 15 12:43:25 2010 +0200 +++ b/serviceproviders/sapi_logging/src/loggingcallback.cpp Wed Mar 31 23:02:09 2010 +0300 @@ -89,12 +89,21 @@ { case EReadEvents : { + if( aStatus == KErrNone ) + { CLiwLogIter *iter = CLiwLogIter :: NewL( aIter ) ; CleanupClosePushL( *iter ); OutParm->AppendL( TLiwGenericParam ( KResponse , TLiwVariant( iter ) ) ) ; CleanupStack :: Pop( iter ) ; iter->DecRef(); iCallBack->HandleNotifyL( aTransId, KLiwEventCompleted, *OutParm, *InParm ) ; + } + else + { + iCallBack->HandleNotifyL( aTransId, KLiwEventError, *OutParm, *InParm ) ; + delete aIter; + aIter = NULL; + } CleanupStack::PopAndDestroy( InParm ); CleanupStack::PopAndDestroy( OutParm ); CleanupStack :: Pop( this ) ; @@ -104,13 +113,22 @@ case EGetEvent : { + if( aStatus == KErrNone ) + { CLiwLogIter *iter = CLiwLogIter :: NewL( aIter ) ; CleanupClosePushL( *iter ); OutParm->AppendL( TLiwGenericParam ( KResponse , TLiwVariant( iter ) ) ) ; CleanupStack :: Pop( iter ) ; iter->DecRef(); iCallBack->HandleNotifyL( aTransId, KLiwEventCompleted, *OutParm, *InParm ) ; - CleanupStack::PopAndDestroy( InParm ); + } + else + { + iCallBack->HandleNotifyL( aTransId, KLiwEventError, *OutParm, *InParm ) ; + delete aIter; + aIter = NULL; + } + CleanupStack::PopAndDestroy( InParm ); CleanupStack::PopAndDestroy( OutParm ); CleanupStack :: Pop( this ) ; delete this ; @@ -119,12 +137,21 @@ case EGetRecent : { + if( aStatus == KErrNone ) + { CLiwLogIter *iter = CLiwLogIter :: NewL( aIter ) ; CleanupClosePushL( *iter ); OutParm->AppendL( TLiwGenericParam ( KResponse , TLiwVariant( iter ) ) ) ; CleanupStack :: Pop( iter ) ; iter->DecRef(); iCallBack->HandleNotifyL( aTransId, KLiwEventCompleted, *OutParm, *InParm ) ; + } + else + { + iCallBack->HandleNotifyL( aTransId, KLiwEventError, *OutParm, *InParm ) ; + delete aIter; + aIter = NULL; + } CleanupStack::PopAndDestroy( InParm ); CleanupStack::PopAndDestroy( OutParm ); CleanupStack :: Pop( this ) ;