idlefw/hslaunch/src/hslaunch.cpp
branchRCL_3
changeset 51 15e4dd19031c
parent 4 1a2a00e78665
--- 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 <e32property.h>
+#include <e32debug.h>
 #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 );
+            }
         }
     }