Fix order of callbacks when error occurs on server 42/258542/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Thu, 20 May 2021 05:24:25 +0000 (14:24 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Thu, 20 May 2021 05:24:25 +0000 (14:24 +0900)
Change-Id: Ica7d7246be36574221ea9b5fc041785b54f52570
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
server/vcd_server.c

index 4355e2d..8c290cf 100644 (file)
@@ -1104,7 +1104,6 @@ static void __vcd_server_nlu_result_cb(vce_result_event_e event, const char* nlu
 int vcd_send_error(vce_error_e error, const char* msg, void *user_data)
 {
        SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Engine Error cb - reason(%d), msg(%s)", error, msg);
-       ecore_main_loop_thread_safe_call_async(__cancel_by_error, NULL);
 
        char* error_msg = NULL;
        if (NULL != msg) {
@@ -1125,6 +1124,8 @@ int vcd_send_error(vce_error_e error, const char* msg, void *user_data)
                error_msg = NULL;
        }
 
+       ecore_main_loop_thread_safe_call_async(__cancel_by_error, NULL);
+
        return ret;
 }