From 36ab3647abca53b478802bc48f7cee882c191664 Mon Sep 17 00:00:00 2001 From: Suyeon Hwang Date: Fri, 10 Dec 2021 16:50:10 +0900 Subject: [PATCH] Add handle type value when initialize config When client initialize the vc_config_mgr, manager and setting client send the handle with unique type value as a parameter into. This is because the uid can be used to check the type of client when vc_config_mgr needs to identify the client. However, widget client did not add unique value into the handle. Thus, this patch makes the widget client send handle with unique value for widget client. By this change, widget client also works same as other types of client. Change-Id: I3eb28c8a97621dd9809447bd63a79858f7353ef8 Signed-off-by: Suyeon Hwang --- client/vc_widget.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client/vc_widget.c b/client/vc_widget.c index e5e7be4..92e0951 100644 --- a/client/vc_widget.c +++ b/client/vc_widget.c @@ -188,7 +188,7 @@ int vc_widget_initialize(vc_h* vc_w) } /* TODO - each handle? */ - int ret = vc_config_mgr_initialize((*vc_w)->handle); + int ret = vc_config_mgr_initialize((*vc_w)->handle + VC_WIDGET_CONFIG_HANDLE); if (0 != ret) { SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Fail to init config manager : %s", __vc_widget_get_error_code(__vc_widget_convert_config_error_code(ret))); @@ -197,10 +197,10 @@ int vc_widget_initialize(vc_h* vc_w) return __vc_widget_convert_config_error_code(ret); } - ret = vc_config_mgr_set_lang_cb((*vc_w)->handle, __vc_widget_lang_changed_cb); + ret = vc_config_mgr_set_lang_cb((*vc_w)->handle + VC_WIDGET_CONFIG_HANDLE, __vc_widget_lang_changed_cb); if (0 != ret) { SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Fail to set config changed : %d", ret); - vc_config_mgr_finalize((*vc_w)->handle); + vc_config_mgr_finalize((*vc_w)->handle + VC_WIDGET_CONFIG_HANDLE); vc_widget_client_destroy((*vc_w)); pthread_mutex_unlock(&g_w_init_mutex); return __vc_widget_convert_config_error_code(ret); @@ -313,8 +313,8 @@ int vc_widget_deinitialize(vc_h vc_w) widget->conn_timer = NULL; } - vc_config_mgr_unset_lang_cb(vc_w->handle); - vc_config_mgr_finalize(vc_w->handle); + vc_config_mgr_unset_lang_cb(vc_w->handle + VC_WIDGET_CONFIG_HANDLE); + vc_config_mgr_finalize(vc_w->handle + VC_WIDGET_CONFIG_HANDLE); /* Free resources */ vc_widget_client_destroy(vc_w); -- 2.7.4