static Ecore_Timer* g_check_state_timer = NULL;
static Ecore_Timer* g_notify_error_timer = NULL;
+static Ecore_Timer* g_prepare_timer = NULL;
/* for repetition */
static char* g_language = NULL;
ecore_timer_del(g_notify_error_timer);
g_notify_error_timer = NULL;
}
+ /* Delete prepare timer before destroying handle */
+ if (NULL != g_prepare_timer) {
+ ecore_timer_del(g_prepare_timer);
+ g_prepare_timer = NULL;
+ }
+
tts = NULL;
/* check handle */
if (NULL == client) {
SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] A handle is not valid");
+ g_prepare_timer = NULL;
return EINA_FALSE;
}
SLOG(LOG_ERROR, TAG_TTSC, "[INFO] TTS client has been already connected to tts service"); //LCOV_EXCL_LINE
SLOG(LOG_ERROR, TAG_TTSC, "@@@");
client->hello_timer = NULL;
+ g_prepare_timer = NULL;
return EINA_FALSE;
}
client->thread = ecore_thread_run(__start_reprepare_thread, __end_reprepare_thread, __cancel_reprepare_thread, tts);
}
client->hello_timer = NULL;
+ g_prepare_timer = NULL;
return EINA_FALSE;
}
}
SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Stop to send hello, retry count reaches the limit");
g_retry_cnt = 0;
client->hello_timer = NULL;
+ g_prepare_timer = NULL;
is_launched = __is_engine_launched(g_engine_appid);
SLOG(LOG_INFO, TAG_TTSC, "[INFO] tts engine is launched(%d)", is_launched);
if (!client->hello_timer) {
SLOG(LOG_ERROR, TAG_TTSC, "@@@ Call checking Hello timer callback");
client->hello_timer = ecore_timer_add(0.5, __send_hello, tts);
+ g_prepare_timer = NULL;
+
return EINA_FALSE;
}
SLOG(LOG_ERROR, TAG_TTSC, "@@@ Call checking Hello timer callback");
g_retry_cnt = 0;
ecore_thread_main_loop_begin();
- ecore_timer_add(0.0, __send_hello, (void*)tts);
+ if (NULL != g_prepare_timer) {
+ ecore_timer_del(g_prepare_timer);
+ g_prepare_timer = NULL;
+ }
+ g_prepare_timer = ecore_timer_add(0.0, __send_hello, (void*)tts);
ecore_thread_main_loop_end();
}