diff -r 502e5d91ad42 -r 15e4dd19031c idlefw/hslaunch/src/hslaunch.cpp --- a/idlefw/hslaunch/src/hslaunch.cpp Mon Mar 15 12:41:53 2010 +0200 +++ b/idlefw/hslaunch/src/hslaunch.cpp Wed Mar 31 22:04:35 2010 +0300 @@ -16,6 +16,7 @@ */ #include +#include #include "hslaunch.h" // ========================= DECLARATIONS ================================== @@ -260,36 +261,36 @@ // ----------------------------------------------------------------------------- // void CHsLaunch::ProcessEnded( const TExitType& aExitType, - const TInt /*aExitReason*/, + const TInt aExitReason, const TExitCategoryName& /*aExitCategory*/ ) { - // Only respond to panic. EExitTerminate and EExitKill are ignored. - if( aExitType != EExitPanic ) - { - return; - } - TInt crashCount = 0; TInt error = RProperty::Get( KPSCategoryUid, KPSCrashCountKey, crashCount ); - if( error == KErrNone ) + // increment crash count in cenrep if the process has panic'd or killed with + // an error code + if( aExitType == EExitPanic || + ( aExitType == EExitKill && aExitReason != KErrNone ) ) { - crashCount++; - error = RProperty::Set( KPSCategoryUid, - KPSCrashCountKey, - crashCount ); - } - - if( error == KErrNone ) - { - User::After( KSleepOnRetry ); - Activate(); - } - else - { - ShutdownApp( error ); + if( error == KErrNone ) + { + crashCount++; + error = RProperty::Set( KPSCategoryUid, + KPSCrashCountKey, + crashCount ); + } + + if( error == KErrNone ) + { + User::After( KSleepOnRetry ); + Activate(); + } + else + { + ShutdownApp( error ); + } } }