From b44d351a529d9f888562600d430b5ef8a09a7f5c Mon Sep 17 00:00:00 2001 From: "sooyeon.kim" Date: Thu, 16 Jan 2020 21:32:23 +0900 Subject: [PATCH] Add engine update checker into __send_hello Change-Id: I46df92d861250e2e377ec724fdae3cd80d764d12 Signed-off-by: sooyeon.kim (cherry picked from commit 121744dc09429cc48df86723ac4139cf8494f81e) --- client/tts.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client/tts.c b/client/tts.c index 1c78f22..3ec8220 100644 --- a/client/tts.c +++ b/client/tts.c @@ -899,6 +899,14 @@ static Eina_Bool __send_hello(void *data) return EINA_FALSE; } + /* check whether engine is updating or not */ + if (g_engine_update_status) { + SLOG(LOG_ERROR, TAG_TTSC, "[DEBUG] cannot prepare due to engine update"); + __tts_cb_error(-1, TTS_ERROR_SERVICE_RESET, -1, "Daemon Reset"); + g_hello_timer = NULL; + return EINA_FALSE; + } + /* Send hello */ int ret = tts_dbus_request_hello(client->uid); if (0 != ret) { @@ -911,6 +919,7 @@ static Eina_Bool __send_hello(void *data) if (TTS_HELLO_RETRY_COUNT == g_retry_cnt) { SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Stop to send hello, retry count reaches the limit"); g_retry_cnt = 0; + g_hello_timer = NULL; return EINA_FALSE; } -- 2.7.4