static void __stt_notify_state_changed(void *data);
-static Eina_Bool __stt_notify_error(void *data);
+static void __stt_notify_error(void *data);
static Ecore_Timer* g_connect_timer = NULL;
static float g_volume_db = 0;
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to initialize : %s", __stt_get_error_code(ret));
client->reason = STT_ERROR_ENGINE_NOT_FOUND;
- ecore_timer_add(0, __stt_notify_error, (void*)client);
+ ecore_main_loop_thread_safe_call_async(__stt_notify_error, (void*)client);
return EINA_FALSE;
return ret;
}
-static Eina_Bool __stt_notify_error(void *data)
+static void __stt_notify_error(void *data)
{
stt_client_s* client = (stt_client_s*)data;
/* check handle */
if (NULL == client) {
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to notify error : A handle is not valid");
- return EINA_FALSE;
+ return;
}
if (NULL == stt_client_get_by_uid(client->uid))
- return EINA_FALSE;
+ return;
if (NULL != client->error_cb) {
stt_client_use_callback(client);
SLOG(LOG_WARN, TAG_STTC, "[WARNING] Error callback is null");
}
- return EINA_FALSE;
+ return;
}
int __stt_cb_error(int uid, int reason, char* err_msg)
SLOG(LOG_INFO, TAG_STTC, "internal state is initialized to 0");
if (NULL != data->error_cb) {
- ecore_timer_add(0, __stt_notify_error, data);
+ ecore_main_loop_thread_safe_call_async(__stt_notify_error, data);
} else {
SLOG(LOG_WARN, TAG_STTC, "[WARNING] Error callback is null");
}
SLOG(LOG_INFO, TAG_STTC, "internal state is initialized to 0");
if (NULL != client->error_cb) {
- ecore_timer_add(0, __stt_notify_error, client);
+ ecore_main_loop_thread_safe_call_async(__stt_notify_error, client);
} else {
SLOG(LOG_WARN, TAG_STTC, "[WARNING] Error callback is null");
}