From: sooyeon.kim Date: Mon, 28 Jan 2019 08:32:47 +0000 (+0900) Subject: Delete processing timer at main thread X-Git-Tag: accepted/tizen/unified/20190426.054042~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fstt.git;a=commitdiff_plain;h=e2ff8a26a52b77b52f1aea40cb64699565c76a99 Delete processing timer at main thread Change-Id: I0595c67ab03efab92e29d93053c9af09a9bd2b8e Signed-off-by: sooyeon.kim (cherry picked from commit fb9c73980096c07f9ca28bdb1ccc078748355780) --- diff --git a/common/stt_engine.c b/common/stt_engine.c index 14e6276..57944a2 100644 --- a/common/stt_engine.c +++ b/common/stt_engine.c @@ -557,7 +557,7 @@ int stt_engine_check_app_agreed(const char* appid, bool* is_agreed) return 0; } - SLOG(LOG_INFO, stt_tag(), "[Engine Info] request to app agreed, appid(%s), is_agreed(%d)", appid, is_agreed); + SLOG(LOG_INFO, stt_tag(), "[Engine Info] request to app agreed, appid(%s), is_agreed(%d)", appid, *is_agreed); int ret = g_engine->callback->check_app_agreed(appid, is_agreed); if (0 != ret) { diff --git a/server/sttd_server.c b/server/sttd_server.c index f1bda74..ccaf29d 100644 --- a/server/sttd_server.c +++ b/server/sttd_server.c @@ -216,8 +216,11 @@ int __server_recognition_result_callback(stte_result_event_e event, const char* /* Delete timer for processing time out */ if (NULL != g_processing_timer) { + ecore_thread_main_loop_begin(); + SLOG(LOG_INFO, TAG_STTD, "[INFO] Delete g_processing_timer"); ecore_timer_del(g_processing_timer); g_processing_timer = NULL; + ecore_thread_main_loop_end(); } sttd_config_time_save(); @@ -272,8 +275,11 @@ int __server_recognition_result_callback(stte_result_event_e event, const char* /* Delete timer for processing time out */ if (NULL != g_processing_timer) { + ecore_thread_main_loop_begin(); + SLOG(LOG_INFO, TAG_STTD, "[INFO] Delete g_processing_timer"); ecore_timer_del(g_processing_timer); g_processing_timer = NULL; + ecore_thread_main_loop_end(); } sttd_config_time_reset(); @@ -707,6 +713,7 @@ int sttd_server_finalize(int uid) if (APP_STATE_PROCESSING == state) { if (NULL != g_processing_timer) { + SLOG(LOG_INFO, TAG_STTD, "[INFO] Delete g_processing_timer"); ecore_timer_del(g_processing_timer); g_processing_timer = NULL; } @@ -1185,6 +1192,7 @@ int sttd_server_start(int uid, const char* lang, const char* recognition_type, i } if (NULL != g_processing_timer) { + SLOG(LOG_INFO, TAG_STTD, "[INFO] Delete g_processing_timer"); ecore_timer_del(g_processing_timer); g_processing_timer = NULL; } @@ -1304,6 +1312,7 @@ int sttd_server_start(int uid, const char* lang, const char* recognition_type, i Eina_Bool __time_out_for_processing(void *data) { if (NULL != g_processing_timer) { + SLOG(LOG_INFO, TAG_STTD, "[INFO] Delete g_processing_timer"); ecore_timer_del(g_processing_timer); g_processing_timer = NULL; } @@ -1402,6 +1411,7 @@ int sttd_server_stop(int uid) } if (NULL != g_processing_timer) { + SLOG(LOG_INFO, TAG_STTD, "[INFO] Delete g_processing_timer"); ecore_timer_del(g_processing_timer); g_processing_timer = NULL; } @@ -1447,6 +1457,7 @@ int sttd_server_stop(int uid) } free(sound); + SLOG(LOG_INFO, TAG_STTD, "[INFO] Add g_processing_timer"); g_processing_timer = ecore_timer_add(g_processing_timeout, __time_out_for_processing, NULL); return STTD_RESULT_STATE_NOT_DONE; @@ -1476,6 +1487,7 @@ int sttd_server_stop(int uid) SLOG(LOG_INFO, TAG_STTD, "[Server SUCCESS] Stop recognition"); + SLOG(LOG_INFO, TAG_STTD, "[INFO] Add g_processing_timer"); g_processing_timer = ecore_timer_add(g_processing_timeout, __time_out_for_processing, NULL); return STTD_RESULT_STATE_DONE; @@ -1509,6 +1521,7 @@ int sttd_server_cancel(int uid) } if (NULL != g_processing_timer) { + SLOG(LOG_INFO, TAG_STTD, "[INFO] Delete g_processing_timer"); ecore_timer_del(g_processing_timer); g_processing_timer = NULL; } @@ -1682,6 +1695,7 @@ int sttd_server_cancel_file(int uid) } if (NULL != g_processing_timer) { + SLOG(LOG_INFO, TAG_STTD, "[INFO] Delete g_processing_timer"); ecore_timer_del(g_processing_timer); g_processing_timer = NULL; }