Fix prevent issue
authorKwangyoun Kim <ky85.kim@samsung.com>
Fri, 12 Apr 2013 08:13:35 +0000 (17:13 +0900)
committerKwangyoun Kim <ky85.kim@samsung.com>
Fri, 12 Apr 2013 08:13:35 +0000 (17:13 +0900)
Change-Id: Idf949ee9b9951d9018185d83681c6ae394a4c5fa

changelog [changed mode: 0644->0755]
client/tts_dbus.c [changed mode: 0644->0755]
client/tts_setting.c [changed mode: 0644->0755]
client/tts_setting.h [changed mode: 0644->0755]
server/ttsd_config_noti.c [changed mode: 0644->0755]
server/ttsd_config_sr.c [changed mode: 0644->0755]
server/ttsd_engine_agent.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index aef8f5d..82545c0
--- a/changelog
+++ b/changelog
@@ -1,3 +1,7 @@
+tts (0.1.59-1) -- Fri, 12 Apr 2013
+
+  * Fix prevent issue (Kwangyoun Kim <ky85.kim@samsung.com>)
+
 tts (0.1.59) -- Wed, 10 Apr 2013
 
   * Release version (Kwangyoun Kim <ky85.kim@samsung.com>)
old mode 100644 (file)
new mode 100755 (executable)
index eb5690e..01c460d
@@ -956,6 +956,7 @@ static Eina_Bool inotify_event_callback(void* data, Ecore_Fd_Handler *fd_handler
        int length;
 
        char buffer[sizeof(struct inotify_event) * BUFFER_SIZE];
+       memset(buffer, 0, (sizeof(struct inotify_event) * BUFFER_SIZE));
 
        length = read(g_fd_noti, buffer, (sizeof(struct inotify_event) * BUFFER_SIZE));
        if (0 > length) {
old mode 100644 (file)
new mode 100755 (executable)
index 9c31073..ee79206
@@ -111,36 +111,6 @@ int tts_setting_initialize(tts_setting_initialized_cb callback, void* user_data)
        return TTS_SETTING_ERROR_NONE;
 }
 
-int tts_setting_initialize_async(tts_setting_initialized_cb callback, void* user_data)
-{
-       SLOG(LOG_DEBUG, TAG_TTSC, "===== Initialize TTS Setting");
-
-       if (TTS_SETTING_STATE_READY == g_state) {
-               SLOG(LOG_WARN, TAG_TTSC, "[WARNING] TTS Setting has already been initialized.");
-               SLOG(LOG_DEBUG, TAG_TTSC, "=====");
-               SLOG(LOG_DEBUG, TAG_TTSC, " ");
-               return TTS_SETTING_ERROR_NONE;
-       }
-
-       if( 0 != tts_setting_dbus_open_connection() ) {
-               SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Fail to open connection");
-               SLOG(LOG_DEBUG, TAG_TTSC, "=====");
-               SLOG(LOG_DEBUG, TAG_TTSC, " ");
-               return TTS_SETTING_ERROR_OPERATION_FAILED;
-       }
-       
-       g_initialized_cb = callback;
-       g_user_data = user_data;
-
-       g_setting_connect_timer = ecore_timer_add(0, __tts_setting_connect_daemon, NULL);
-
-       SLOG(LOG_DEBUG, TAG_TTSC, "=====");
-       SLOG(LOG_DEBUG, TAG_TTSC, " ");
-
-       return TTS_SETTING_ERROR_NONE;
-}
-
-
 int tts_setting_finalize()
 {
        SLOG(LOG_DEBUG, TAG_TTSC, "===== Finalize TTS Setting");
old mode 100644 (file)
new mode 100755 (executable)
index 828da0d..55caf70
@@ -148,8 +148,6 @@ typedef void(*tts_setting_initialized_cb)(tts_setting_state_e state, tts_setting
 */
 int tts_setting_initialize(tts_setting_initialized_cb callback, void* user_data);
 
-int tts_setting_initialize_async(tts_setting_initialized_cb callback, void* user_data);
-
 /**
 * @brief finalize tts setting and disconnect to tts-daemon. 
 *
old mode 100644 (file)
new mode 100755 (executable)
index de8b42b..c02d4fe
@@ -270,6 +270,7 @@ static Eina_Bool inotify_event_callback(void* data, Ecore_Fd_Handler *fd_handler
        int length;
 
        char buffer[sizeof(struct inotify_event) * BUFFER_SIZE];
+       memset(buffer, 0, (sizeof(struct inotify_event) * BUFFER_SIZE));
 
        length = read(g_fd_noti, buffer, (sizeof(struct inotify_event) * BUFFER_SIZE));
        if (0 > length) {
old mode 100644 (file)
new mode 100755 (executable)
index 2a8a82f..1364dcf
@@ -322,4 +322,4 @@ int ttsd_config_save_error(int uid, int uttid, const char* lang, int vctype, con
        fclose(err_fp);
 
        return 0;
-}
+}
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index e10a849..d8c807b
@@ -675,6 +675,10 @@ int ttsd_engine_agent_load_current_engine()
 
                                iter = g_list_next(iter);
                        }
+                       if (NULL == voice) {
+                               SLOG(LOG_ERROR, get_tag(), "[Engine ERROR] Fail to find voice in list");
+                               return TTSD_ERROR_OPERATION_FAILED;
+                       }
        
                        /* Set selected language and type */
                        if (true != g_cur_engine.pefuncs->is_valid_voice(voice->language, voice->type)) {