The opened module before calling the dispatcher is required 79/165379/1 accepted/tizen/4.0/unified/20180102.065529 submit/tizen_4.0/20171228.113332
authorYoungHun Kim <yh8004.kim@samsung.com>
Wed, 27 Dec 2017 07:09:58 +0000 (16:09 +0900)
committerYoungHun Kim <yh8004.kim@samsung.com>
Thu, 28 Dec 2017 11:24:52 +0000 (11:24 +0000)
Change-Id: I8ff05deca088e677ff4de7807e7865c1353880b6
(cherry picked from commit 6db4e0150334b1dba3eee4daabcffc6abde8e3f3)

packaging/mused.spec
server/src/muse_server_ipc.c

index 2f1cbe6..bf502c3 100644 (file)
@@ -1,6 +1,6 @@
 Name:       mused
 Summary:    A multimedia daemon
-Version:    0.3.24
+Version:    0.3.25
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index 48e5ff4..e4e6e8e 100644 (file)
@@ -127,6 +127,7 @@ static gpointer _ms_ipc_dispatch_worker(gpointer data)
                                                g_mutex_lock(&dispatch_lock);
                                                if (muse_core_msg_object_get_value(MSG_KEY_MODULE_INDEX, jobj, MUSE_TYPE_INT, &idx)) {
                                                        m->idx = idx;
+                                                       m->ch[MUSE_CHANNEL_MSG].dll_handle = ms_module_open(idx);
                                                        if (_ms_ipc_module_instance_creation_is_allowed(idx) == FALSE) {
                                                                ms_cmd_dispatch(m, MUSE_MODULE_COMMAND_RESOURCE_NOT_AVAILABLE);
                                                                g_mutex_unlock(&dispatch_lock);
@@ -136,7 +137,6 @@ static gpointer _ms_ipc_dispatch_worker(gpointer data)
                                                                LOGW("connected pid [%d] msg [%d] is different", m->pid, pid);
                                                        ms_connection_register(m);
                                                        m->is_create_api_called = true;
-                                                       m->ch[MUSE_CHANNEL_MSG].dll_handle = ms_module_open(idx);
 #ifndef MUSE_USE_LWIPC
                                                        if (access(MUSE_SERVER_READY, F_OK) == 0)
 #endif
@@ -171,6 +171,7 @@ static gpointer _ms_ipc_dispatch_worker(gpointer data)
                                                        g_mutex_lock(&dispatch_lock);
                                                        if (muse_core_msg_object_get_value(MSG_KEY_MODULE_INDEX, jobj, MUSE_TYPE_INT, &idx)) {
                                                                m->idx = idx;
+                                                               m->ch[MUSE_CHANNEL_MSG].dll_handle = ms_module_open(idx);
                                                                if (_ms_ipc_module_instance_creation_is_allowed(idx) == FALSE) {
                                                                        ms_cmd_dispatch(m, MUSE_MODULE_COMMAND_RESOURCE_NOT_AVAILABLE);
                                                                        g_mutex_unlock(&dispatch_lock);
@@ -181,7 +182,6 @@ static gpointer _ms_ipc_dispatch_worker(gpointer data)
                                                                g_mutex_init(&m->ch[MUSE_CHANNEL_DATA].data_mutex);
                                                                g_cond_init(&m->ch[MUSE_CHANNEL_DATA].data_cond);
                                                                value = ms_module_get_loaded_dllsym(idx);
-                                                               m->ch[MUSE_CHANNEL_MSG].dll_handle = ms_module_open(idx);
                                                        }
                                                }