Update version to 1.70.7
[platform/core/uifw/voice-control.git] / client / vc_widget_tidl.c
index 36b68ec..9b6a80b 100644 (file)
@@ -73,7 +73,7 @@ static void __notify_cb(void *user_data, bundle *msg)
                }
        } /* VCD_METHOD_HELLO */
 
-       else if (0 == strncmp(VCD_WIDGET_METHOD_SET_SERVICE_STATE, method, strlen(VCD_WIDGET_METHOD_SET_SERVICE_STATE))) {
+       else if (0 == strncmp(VCD_METHOD_SET_SERVICE_STATE, method, strlen(VCD_METHOD_SET_SERVICE_STATE))) {
                bundle_get_str(msg, VC_BUNDLE_SERVICE_STATE, &val);
                int state = 0;
                if (val) {
@@ -81,7 +81,7 @@ static void __notify_cb(void *user_data, bundle *msg)
                        SLOG(LOG_INFO, TAG_VCW, "@@ service state changed : %d", state);
                        __vc_widget_cb_service_state(state);
                }
-       } /* VCD_WIDGET_METHOD_SET_SERVICE_STATE */
+       } /* VCD_METHOD_SET_SERVICE_STATE */
 
        else if (0 == strncmp(VCD_WIDGET_METHOD_SHOW_TOOLTIP, method, strlen(VCD_WIDGET_METHOD_SHOW_TOOLTIP))) {
                SLOG(LOG_DEBUG, TAG_VCW, "@@@ Show / Hide tooltip");
@@ -501,7 +501,19 @@ int vc_widget_tidl_request_finalize(int pid)
        }
 
        if (VC_ERROR_NONE != ret) {
-               SLOG(LOG_ERROR, TAG_VCW, "[TIDL ERROR] Request vc widget finalize : Fail to invoke message, error(%d)", ret);
+               SLOG(LOG_ERROR, TAG_VCW, "[TIDL ERROR] Request vc widget finalize : Fail to invoke finalize, error(%d)", ret);
+               pthread_mutex_unlock(&g_w_init_mutex);
+               return ret;
+       }
+
+       ret = rpc_port_proxy_vc_widget_proxy_vc_widget_disconnect(g_proxy_tidl_info->rpc_h);
+       exception = get_last_result();
+       if (RPC_PORT_ERROR_NONE != exception) {
+               ret = __convert_unhandled_error(exception);
+       }
+
+       if (VC_ERROR_NONE != ret) {
+               SLOG(LOG_ERROR, TAG_VCW, "[TIDL ERROR] Request vc widget finalize : Fail to disconnect, error(%d)", ret);
                pthread_mutex_unlock(&g_w_init_mutex);
                return ret;
        }