Fix crash issue 28/190628/3
authorsooyeon.kim <sooyeon.kim@samsung.com>
Thu, 4 Oct 2018 08:20:17 +0000 (17:20 +0900)
committersooyeon.kim <sooyeon.kim@samsung.com>
Thu, 4 Oct 2018 09:19:08 +0000 (18:19 +0900)
Change-Id: I9272b5e159060f10524cea64944a4b654cf3923e
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
src/multi_assistant_service_plugin.c

index 3e8c54c5e1bbd68464143a4b936371c8e60c2cd2..2c1629c16597742305ecbd841a2eef2fbab1aef1 100644 (file)
@@ -212,6 +212,22 @@ static void __speech_status_cb(wakeup_service_speech_status_e status, void *user
        }
 }
 
+static Eina_Bool __wakeup_start_recording(void* data)
+{
+       MAS_LOGD( "[SUCCESS] __wakeup_start_recording is called.");
+
+       (void*)data;
+
+       int ret;
+
+       ret = wakeup_service_start_recording();
+       if (0 != ret) {
+               MAS_LOGE("[ERROR] Fail to start recording, ret(%d)", ret);
+       }
+
+       return EINA_FALSE;
+}
+
 static void __error_cb(int error, const char* err_msg, void* user_data)
 {
        MAS_LOGD( "[SUCCESS] __error_cb is called, error(%d), err_msg(%d)", error, err_msg);
@@ -219,11 +235,8 @@ static void __error_cb(int error, const char* err_msg, void* user_data)
        if (0 != ret) {
                MAS_LOGE("[ERROR] Fail to cancel recording, ret(%d)", ret);
        }
-       
-       ret = wakeup_service_start_recording();
-       if (0 != ret) {
-               MAS_LOGE("[ERROR] Fail to start recording, ret(%d)", ret);
-       }
+
+       ecore_timer_add(0, __wakeup_start_recording, NULL);
 
        ret = masc_ui_dbus_send_error_message(error, err_msg);
        if (0 != ret) {