From: giwoong.kim Date: Thu, 23 Aug 2012 09:58:48 +0000 (+0900) Subject: [Title] added HB timeout err popup & increase the time X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~1509 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1effe687c98b0198c33dbf2c58787fa482055706;p=sdk%2Femulator%2Fqemu.git [Title] added HB timeout err popup & increase the time [Type] feature [Module] Emulator / skin [Priority] major [Jira#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- diff --git a/tizen/src/maru_err_table.c b/tizen/src/maru_err_table.c index 40b9293b53..5a40889c36 100644 --- a/tizen/src/maru_err_table.c +++ b/tizen/src/maru_err_table.c @@ -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 } + diff --git a/tizen/src/maru_err_table.h b/tizen/src/maru_err_table.h index 6d127bbbaa..8b25cc154d 100644 --- a/tizen/src/maru_err_table.h +++ b/tizen/src/maru_err_table.h @@ -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 }; diff --git a/tizen/src/skin/maruskin_server.c b/tizen/src/skin/maruskin_server.c index 1e6f9c8d62..6e352a3c64 100644 --- a/tizen/src/skin/maruskin_server.c +++ b/tizen/src/skin/maruskin_server.c @@ -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(); }