#define PATH "path"
#define PRELOADED "preloaded"
#define TIMEOUT "timeout"
+#define DIABLEWATCHDOGAPI "disable_watchdog_api"
typedef struct host_info {
char *path;
char *preloaded;
int timeout;
+ int disable_watchdog_api;
} host_info_t;
typedef struct muse_core_config {
static void _muse_core_check_memory(pid_t pid)
{
- int used_pss_mb;
+ int used_pss_mb = muse_core_system_get_instance()->get_memory_info(pid);
if (g_queue_is_empty(muse_core_ipc_get_instance()->module_queue)) {
- used_pss_mb = muse_core_system_get_instance()->get_memory_info(pid);
if (used_pss_mb > muse_core_config_get_instance()->memory_threshold) {
LOGE("[Memory Leak] %d > %d", used_pss_mb, muse_core_config_get_instance()->memory_threshold);
muse_core_log_process_info(pid);
goto out;
}
+ /* disable_watchdog_api */
+ snprintf(host_name, MUSE_MAX_MSG_LEN, "%s%s%s", host, COLON, DIABLEWATCHDOGAPI);
+
+ g_muse_core_conf->host_infos[host_cnt]->disable_watchdog_api =
+ atoi(iniparser_getstring(g_muse_core_conf->muse_dict, host_name, NULL));
+
host = strtok_r(NULL, COMMA, &ptr);
g_muse_core_conf->host_cnt++;
MUSE_FREE(host_name);
static gboolean _muse_core_module_enable_dispatch_callback(int cmd, muse_module_h module)
{
- if (module->api_module == MUSE_CAMERA || module->api_module == MUSE_RECORDER) {
- if (cmd == API_CREATE)
- return FALSE;
- }
+ if (cmd == muse_core_config_get_instance()->host_infos[module->api_module]->disable_watchdog_api)
+ return FALSE;
return TRUE;
}