Add engine update checker into __send_hello 30/224430/1
authorsooyeon.kim <sooyeon.kim@samsung.com>
Thu, 16 Jan 2020 12:32:23 +0000 (21:32 +0900)
committerSooyeon Kim <sooyeon.kim@samsung.com>
Mon, 10 Feb 2020 12:01:43 +0000 (12:01 +0000)
Change-Id: I46df92d861250e2e377ec724fdae3cd80d764d12
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
(cherry picked from commit 121744dc09429cc48df86723ac4139cf8494f81e)

client/tts.c

index 1c78f22..3ec8220 100644 (file)
@@ -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;
        }