From: Ji-hoon Lee Date: Tue, 20 Aug 2019 11:59:56 +0000 (+0900) Subject: Use ecore_main_loop_thread_safe_call_async() instead of timer X-Git-Tag: submit/tizen/20190821.051714^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=279d73981505e7d5e0881fe6cef8c68593c23302;p=platform%2Fcore%2Fuifw%2Fwakeup-engine-default.git Use ecore_main_loop_thread_safe_call_async() instead of timer Change-Id: I47e74554baf3dd216ce45ab686adb41cf47d9785 --- diff --git a/src/multi_assistant_service_plugin.c b/src/multi_assistant_service_plugin.c index cd2fa8d..4909f43 100644 --- a/src/multi_assistant_service_plugin.c +++ b/src/multi_assistant_service_plugin.c @@ -268,18 +268,15 @@ static bool __validate_streaming_event_order(int pid, wakeup_speech_streaming_ev return ret; } -static Eina_Bool handle_speech_streaming_event_failure(void *data) +static void handle_speech_streaming_event_failure(void *data) { mas_client_send_recognition_result(0, MA_RECOGNITION_RESULT_EVENT_ERROR); - return ECORE_CALLBACK_CANCEL; } static void __audio_streaming_cb(wakeup_speech_streaming_event_e event, unsigned char* buffer, int len, void *user_data) { if (event == WAKEUP_SPEECH_STREAMING_EVENT_FAIL) { - ecore_thread_main_loop_begin(); - ecore_timer_add(0.0f, handle_speech_streaming_event_failure, NULL); - ecore_thread_main_loop_begin(); + ecore_main_loop_thread_safe_call_async(handle_speech_streaming_event_failure, NULL); return; } static int count = 0;