[Title] added HB timeout err popup & increase the time
authorgiwoong.kim <giwoong.kim@samsung.com>
Thu, 23 Aug 2012 09:58:48 +0000 (18:58 +0900)
committergiwoong.kim <giwoong.kim@samsung.com>
Thu, 23 Aug 2012 09:58:48 +0000 (18:58 +0900)
[Type] feature
[Module] Emulator / skin
[Priority] major
[Jira#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

tizen/src/maru_err_table.c
tizen/src/maru_err_table.h
tizen/src/skin/maruskin_server.c

index 40b9293..5a40889 100644 (file)
@@ -49,6 +49,7 @@ Check if the file is corrupted or missing.\n\n",
     /* 3 */ "Failed to load a bios file the following path.\
 Check if the file is corrupted or missing.\n\n",
     /* 4 */ "Skin process cannot be initialized. Skin server is not ready.",
+    /* 5 */ "Skin client cannot connected to Skin server. The time of internal heartbeat has expired.",
     /* add here.. */
     ""
 };
@@ -62,6 +63,11 @@ void maru_register_exit_msg(int maru_exit_index, char *additional_msg)
     int len = 0;
 
     if (maru_exit_index >= MARU_EXIT_NORMAL) {
+        fprintf(stderr, "Invalid error message index = %d\n", maru_exit_index);
+        return;
+    }
+    if (maru_exit_status != MARU_EXIT_NORMAL) {
+        fprintf(stderr, "The error message is already registered = %d\n", maru_exit_status);
         return;
     }
 
@@ -95,6 +101,9 @@ void maru_register_exit_msg(int maru_exit_index, char *additional_msg)
 
         pstrcpy(maru_exit_msg, strlen(additional_msg) + 1, additional_msg);
     }
+
+    fprintf(stdout, "The error message is registered = %d : %s\n",
+        maru_exit_status, maru_exit_msg);
 }
 
 void maru_atexit(void)
@@ -152,7 +161,7 @@ char *maru_convert_path(char *msg, const char *path)
 
         dos_err_msg = g_strdup(err_msg);
         if (!dos_err_msg) {
-            printf(stderr,
+            fprintf(stderr,
                 "failed to duplicate an error message from %p\n", err_msg);
             if (current_path) {
                 g_free(current_path);
@@ -300,3 +309,4 @@ void maru_dump_backtrace(void *ptr, int depth)
     free(symbols);
 #endif
 }
+
index 6d127bb..8b25cc1 100644 (file)
@@ -43,6 +43,7 @@ enum {
     /* 2 */ MARU_EXIT_KERNEL_FILE_EXCEPTION,
     /* 3 */ MARU_EXIT_BIOS_FILE_EXCEPTION,
     /* 4 */ MARU_EXIT_SKIN_SERVER_FAILED,
+    /* 5 */ MARU_EXIT_HB_TIME_EXPIRED,
     /* add here.. */
     MARU_EXIT_NORMAL
 };
index 1e6f9c8..6e352a3 100644 (file)
@@ -48,6 +48,7 @@
 #include "emul_state.h"
 #include "maruskin_client.h"
 #include "emulator.h"
+#include "maru_err_table.h"
 
 #ifndef USE_SHM
 #include "maru_sdl.h"
@@ -996,7 +997,7 @@ static void* do_heart_beat( void* args ) {
         if (booting_handicap_cnt < 5) {
             booting_handicap_cnt++;
             ts_heartbeat.tv_sec = current.tv_sec +
-                (HEART_BEAT_INTERVAL * (HEART_BEAT_FAIL_COUNT / 2));
+                (HEART_BEAT_INTERVAL * 10);
         } else {
             ts_heartbeat.tv_sec = current.tv_sec + HEART_BEAT_INTERVAL;
         }
@@ -1108,6 +1109,7 @@ static void* do_heart_beat( void* args ) {
         ERR( "!!! Fail to operate with heartbeat from skin client. Shutdown QEMU !!!\n" );
         ERR( "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" );
 
+        maru_register_exit_msg(MARU_EXIT_HB_TIME_EXPIRED, NULL);
         shutdown_qemu_gracefully();
 
     }