Update to sync with tizen_5.0 branch 36/199836/2
authorYoungHun Kim <yh8004.kim@samsung.com>
Fri, 15 Feb 2019 01:53:53 +0000 (10:53 +0900)
committerYoungHun Kim <yh8004.kim@samsung.com>
Fri, 15 Feb 2019 02:00:10 +0000 (11:00 +0900)
Change-Id: Ib86f1499aa0b4432076960c9349a0ba13b6bc449

core/include/muse_core.h
core/src/muse_core.c
packaging/mused.spec
server/include/muse_server_config.h
server/src/muse_server_config.c
server/src/muse_server_private.c
server/src/muse_server_system.c

index 3989171..c1f2fa6 100644 (file)
@@ -111,7 +111,7 @@ void muse_core_create_fd_table(void);
 void muse_core_remove_all_fd_table(void);
 void muse_core_destroy_fd_table(void);
 void muse_core_log_process_thread_info(int pid);
-void muse_core_log_process_opened_fd(int pid);
+void muse_core_log_process_opened_fds(int pid);
 void muse_core_log_process_cpu_memory(int pid);
 void muse_core_log_file_list(const char *path);
 void muse_core_log_cmd_info(char *cmd);
index 4df32b9..63dad5f 100644 (file)
@@ -781,7 +781,7 @@ void muse_core_log_process_thread_info(int pid)
        muse_core_log_cmd_info(cmd);
 }
 
-void muse_core_log_process_opened_fd(int pid)
+void muse_core_log_process_opened_fds(int pid)
 {
        char cmd[MUSE_MSG_LEN_MAX];
 
index 6f8807c..5b6ee94 100644 (file)
@@ -1,6 +1,6 @@
 Name:       mused
 Summary:    A multimedia daemon
-Version:    0.3.68
+Version:    0.3.69
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause
index 7eb603f..5f727ef 100644 (file)
@@ -105,6 +105,7 @@ int ms_config_get_timeout(int module_idx);
 int ms_config_get_disable_watchdog_api(int module_idx);
 int ms_config_get_max_instance(int module_idx);
 int ms_config_get_caution_instance(int module_idx);
+gboolean ms_config_is_external_storage_enabled(void);
 
 #ifdef __cplusplus
 }
index 0a99baa..14295bc 100644 (file)
@@ -387,3 +387,11 @@ int ms_config_get_caution_instance(int module_idx)
        return conf->host_infos[module_idx]->caution_instance;
 }
 
+gboolean ms_config_is_external_storage_enabled(void)
+{
+       ms_config_t *conf = _ms_config_get_instance();
+       muse_return_val_if_fail(conf, FALSE);
+
+       return conf->is_watch_external_storage_enabled;
+}
+
index 4345bc9..67c29fe 100644 (file)
@@ -876,7 +876,7 @@ void ms_log_process_info(int pid)
 {
        muse_core_log_process_thread_info(pid);
 
-       muse_core_log_process_opened_fd(pid);
+       muse_core_log_process_opened_fds(pid);
 
        muse_core_log_process_cpu_memory(pid);
 }
index d912941..e8114fa 100644 (file)
@@ -392,7 +392,7 @@ void ms_system_subscribe_external_event(ms_system_t *system)
 {
 #ifdef MUSE_USE_EXTERNAL_STORAGE_STATE_CHANGE
        int ret = MM_ERROR_NONE;
-       bool is_external_storage_enabled;
+       bool is_external_storage_enabled = false;
 #endif
        muse_return_if_fail(system);
 
@@ -402,9 +402,13 @@ void ms_system_subscribe_external_event(ms_system_t *system)
 #endif
 
 #ifdef MUSE_USE_EXTERNAL_STORAGE_STATE_CHANGE
+       /* external storage feature is supported as of tizen_5.5 */
        ret = system_info_get_platform_bool(MUSE_STORAGE_EXTERNAL_FEATURE, &is_external_storage_enabled);
-       if (ret == MM_ERROR_NONE && is_external_storage_enabled == true &&
-               _ms_system_subscribe_external_storage_state_change(system) != MM_ERROR_NONE)
+
+       if (ret != MM_ERROR_NONE) /* get the value of mused.conf until tizen_5.0 */
+               is_external_storage_enabled = (bool)ms_config_is_external_storage_enabled();
+
+       if (is_external_storage_enabled == true && _ms_system_subscribe_external_storage_state_change(system) != MM_ERROR_NONE)
                LOGE("Fail to subscribe external storage state change");
 #endif