Update the value of watchdog timeout at main thread 98/152198/1
authorYoungHun Kim <yh8004.kim@samsung.com>
Mon, 25 Sep 2017 08:27:21 +0000 (17:27 +0900)
committerYoungHun Kim <yh8004.kim@samsung.com>
Mon, 25 Sep 2017 08:27:24 +0000 (17:27 +0900)
Change-Id: Id711af7053f97d5b4f832c6e491337829668edfc

server/include/muse_server_watchdog.h
server/src/muse_server_module.c

index 937adbd..15aac0e 100644 (file)
@@ -28,9 +28,9 @@ extern "C" {
 
 #include "muse_core_internal.h"
 
-#define MUSE_SERVER_WATCHDOG_CHECK_PERIOD 10
+#define MUSE_SERVER_WATCHDOG_CHECK_PERIOD 30
 #define MUSE_SERVER_WATCHDOG_CHECK_COUNT  3
-#define MUSE_SERVER_WATCHDOG_TIMER_PERIOD 5
+#define MUSE_SERVER_WATCHDOG_TIMER_PERIOD 10
 
 typedef struct muse_server_watchdog {
        GMutex lock;
index 97b8a6f..4a404a3 100644 (file)
@@ -70,12 +70,16 @@ static gboolean _muse_server_module_dispatch_timeout_callback(gpointer data)
 {
        muse_module_h module = (muse_module_h)data;
        char err_msg[MUSE_MAX_MSG_LEN];
+       int api_module, disp_api, timeout;
 
        LOGE("Restart muse server");
 
        if (module) {
-               snprintf(err_msg, sizeof(err_msg), "[DEADLOCK] %s {%d}'s dispatcher (%d) does not retrun value",
-                                       muse_server_config_get_instance()->host[module->api_module], module->pid, module->last_cmd);
+               api_module = module->api_module;
+               disp_api = module->last_cmd;
+               timeout = _muse_server_module_get_timeout(api_module, disp_api);
+               snprintf(err_msg, sizeof(err_msg), "[DEADLOCK] %s {%d}'s dispatcher (%d) does not retrun value within (%d) second",
+                                       muse_server_config_get_instance()->host[api_module], module->pid, disp_api, timeout);
 
                LOGE("%s", err_msg);
                if (muse_server_is_log_enabled())