From ec4677652a0c233dc24f4c23dddec611b76c9955 Mon Sep 17 00:00:00 2001 From: YoungHun Kim Date: Wed, 27 Dec 2017 16:09:58 +0900 Subject: [PATCH] The opened module before calling the dispatcher is required Change-Id: I8ff05deca088e677ff4de7807e7865c1353880b6 (cherry picked from commit 6db4e0150334b1dba3eee4daabcffc6abde8e3f3) --- packaging/mused.spec | 2 +- server/src/muse_server_ipc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packaging/mused.spec b/packaging/mused.spec index 2f1cbe6..bf502c3 100644 --- a/packaging/mused.spec +++ b/packaging/mused.spec @@ -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 diff --git a/server/src/muse_server_ipc.c b/server/src/muse_server_ipc.c index 48e5ff4..e4e6e8e 100644 --- a/server/src/muse_server_ipc.c +++ b/server/src/muse_server_ipc.c @@ -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); } } -- 2.7.4