X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=common%2Ftts_config_mgr.c;h=21ccd8ab0f85c176b0ff7c4e2d8443dca58f8a4c;hb=bab71d5de9d15059a5f3147d04d67f653149cf7e;hp=da566c70a7ced8a4a8a5f2eb80b8b54beea3b705;hpb=29e9a7f305284fb9f4157e9df94a73c4fa757ad0;p=platform%2Fcore%2Fuifw%2Ftts.git diff --git a/common/tts_config_mgr.c b/common/tts_config_mgr.c index da566c7..21ccd8a 100644 --- a/common/tts_config_mgr.c +++ b/common/tts_config_mgr.c @@ -330,7 +330,7 @@ int __tts_config_mgr_select_lang(const char* engine_id, char** language, int* ty Eina_Bool tts_config_mgr_inotify_event_cb(void* data, Ecore_Fd_Handler *fd_handler) { - SLOG(LOG_DEBUG, tts_tag(), "===== Config changed callback event"); + SLOG(LOG_DEBUG, tts_tag(), "@@@ Config changed callback event"); int length; struct inotify_event event; @@ -339,8 +339,7 @@ Eina_Bool tts_config_mgr_inotify_event_cb(void* data, Ecore_Fd_Handler *fd_handl length = read(g_config_fd_noti, &event, sizeof(struct inotify_event)); if (0 > length) { SLOG(LOG_ERROR, tts_tag(), "[ERROR] Empty Inotify event"); - SLOG(LOG_DEBUG, tts_tag(), "====="); - SLOG(LOG_DEBUG, tts_tag(), " "); + SLOG(LOG_DEBUG, tts_tag(), "@@@"); return ECORE_CALLBACK_DONE; } @@ -496,12 +495,15 @@ Eina_Bool tts_config_mgr_inotify_event_cb(void* data, Ecore_Fd_Handler *fd_handl free(lang); lang = NULL; } + } else if (IN_IGNORED == event.mask) { + SLOG(LOG_ERROR, tts_tag(), "[ERROR] IN_IGNORED event"); + tts_parser_unload_config(g_config_info); + tts_parser_load_config(&g_config_info); } else { - SLOG(LOG_ERROR, tts_tag(), "[ERROR] Undefined event"); + SLOG(LOG_ERROR, tts_tag(), "[ERROR] Undefined event (0x%x)", event.mask); } - SLOG(LOG_DEBUG, tts_tag(), "====="); - SLOG(LOG_DEBUG, tts_tag(), " "); + SLOG(LOG_DEBUG, tts_tag(), "@@@"); return ECORE_CALLBACK_PASS_ON; } @@ -860,7 +862,7 @@ int __tts_config_mgr_get_engine_info() static Eina_Bool __tts_config_mgr_engine_config_inotify_event_callback(void* data, Ecore_Fd_Handler *fd_handler) { - SLOG(LOG_DEBUG, tts_tag(), "===== Engine config updated callback event"); + SLOG(LOG_DEBUG, tts_tag(), "@@@ Engine config updated callback event"); tts_engine_inotify_s *ino = (tts_engine_inotify_s *)data; int dir_fd = ino->dir_fd; @@ -872,8 +874,7 @@ static Eina_Bool __tts_config_mgr_engine_config_inotify_event_callback(void* dat length = read(dir_fd, &event, sizeof(struct inotify_event)); if (0 > length) { SLOG(LOG_ERROR, tts_tag(), "[ERROR] Empty Inotify event"); - SLOG(LOG_DEBUG, tts_tag(), "====="); - SLOG(LOG_DEBUG, tts_tag(), " "); + SLOG(LOG_DEBUG, tts_tag(), "@@@"); return ECORE_CALLBACK_DONE; } @@ -928,8 +929,7 @@ static Eina_Bool __tts_config_mgr_engine_config_inotify_event_callback(void* dat SLOG(LOG_ERROR, tts_tag(), "[ERROR] Undefined event"); } - SLOG(LOG_DEBUG, tts_tag(), "====="); - SLOG(LOG_DEBUG, tts_tag(), " "); + SLOG(LOG_DEBUG, tts_tag(), "@@@"); return ECORE_CALLBACK_PASS_ON; } @@ -1178,7 +1178,7 @@ int tts_config_mgr_initialize(int uid) } /* print daemon config */ - SLOG(LOG_DEBUG, tts_tag(), "== TTS config =="); + SLOG(LOG_DEBUG, tts_tag(), "@@@ TTS config @@@"); SECURE_SLOG(LOG_DEBUG, tts_tag(), " engine : %s", g_config_info->engine_id); SECURE_SLOG(LOG_DEBUG, tts_tag(), " setting : %s", g_config_info->setting); SECURE_SLOG(LOG_DEBUG, tts_tag(), " auto voice : %s", g_config_info->auto_voice ? "on" : "off"); @@ -1186,7 +1186,7 @@ int tts_config_mgr_initialize(int uid) SECURE_SLOG(LOG_DEBUG, tts_tag(), " voice type : %d", g_config_info->type); SECURE_SLOG(LOG_DEBUG, tts_tag(), " speech rate : %d", g_config_info->speech_rate); SECURE_SLOG(LOG_DEBUG, tts_tag(), " pitch : %d", g_config_info->pitch); - SLOG(LOG_DEBUG, tts_tag(), "================="); + SLOG(LOG_DEBUG, tts_tag(), "@@@@@"); if (0 != __tts_config_mgr_register_config_event()) { SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to register config event");