Merge "Fix passing parameter after null" into tizen accepted/tizen/3.0/ivi/20161011.065128 accepted/tizen/3.0/mobile/20161015.034359 accepted/tizen/3.0/tv/20161016.010009 accepted/tizen/3.0/wearable/20161015.084427 accepted/tizen/common/20161004.194233 accepted/tizen/ivi/20161004.233743 accepted/tizen/mobile/20161004.233656 accepted/tizen/tv/20161004.233713 accepted/tizen/wearable/20161004.233728 submit/tizen/20161004.072248 submit/tizen_3.0_common/20161104.104000 submit/tizen_3.0_ivi/20161010.000007 submit/tizen_3.0_mobile/20161015.000007 submit/tizen_3.0_tv/20161015.000006 submit/tizen_3.0_wearable/20161015.000006
authorWonnam Jang <wn.jang@samsung.com>
Tue, 4 Oct 2016 07:19:55 +0000 (00:19 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Tue, 4 Oct 2016 07:19:55 +0000 (00:19 -0700)
common/tts_config_mgr.c [changed mode: 0644->0755]
common/tts_config_parser.c [changed mode: 0644->0755]
engine-parser/src/tts-engine-parser.c [changed mode: 0644->0755]
org.tizen.voice.ttsnotiserver.service
org.tizen.voice.ttsserver.service
org.tizen.voice.ttssrserver.service
packaging/tts.spec
server/ttsd_server.c [changed mode: 0644->0755]
test/test_main.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 8a54868..1304fc0
@@ -942,12 +942,16 @@ static int __tts_config_mgr_register_engine_config_updated_event(const char* pat
        SLOG(LOG_DEBUG, tts_tag(), "Add inotify watch(%s)", path);
        if (ino->dir_wd < 0) {
                SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to add watch");
+               free(ino);
+               ino = NULL;
                return -1;
        }
 
        ino->dir_fd_handler = ecore_main_fd_handler_add(ino->dir_fd, ECORE_FD_READ, (Ecore_Fd_Cb)__tts_config_mgr_engine_config_inotify_event_callback, (void *)ino, NULL, NULL);
        if (NULL == ino->dir_fd_handler) {
                SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to add fd handler");
+               free(ino);
+               ino = NULL;
                return -1;
        }
 
@@ -1394,7 +1398,7 @@ int __tts_set_buxtonkey(const char* engine)
                SLOG(LOG_ERROR, tts_tag(), "[DBUS-BUXTON2] buxton_open failed!! (%d)", ret);
                return TTS_CONFIG_ERROR_OPERATION_FAILED;
        }
-       bux_layer = buxton_create_layer("user");
+       bux_layer = buxton_create_layer("system");
        if (NULL == bux_layer) {
                SLOG(LOG_ERROR, tts_tag(), "[DBUS-BUXTON2] buxton_create_layer FAIL");
                buxton_close(bux_cli);
old mode 100644 (file)
new mode 100755 (executable)
index 9de67eb..6df067b
@@ -137,7 +137,6 @@ int tts_parser_get_engine_info(const char* path, tts_engine_info_s** engine_info
 
                        while (NULL != voice_node) {
                                if (0 == xmlStrcmp(voice_node->name, (const xmlChar *)TTS_TAG_ENGINE_VOICE)) {
-
                                        tts_config_voice_s* temp_voice = (tts_config_voice_s*)calloc(1, sizeof(tts_config_voice_s));
                                        if (NULL == temp_voice) {
                                                SLOG(LOG_ERROR, tts_tag(), "[ERROR] Out of memory");
old mode 100644 (file)
new mode 100755 (executable)
index a9765a8..c5e2e27
@@ -131,7 +131,9 @@ static int __remove_engine_info_xml(const char *pkgid)
        snprintf(path, 256, "%s/%s.xml", TTS_ENGINE_INFO, pkgid);
        if (0 == access(path, F_OK)) {
                LOGD("Remove engine info xml(%s)", path);
-               remove(path);
+               if (0 != remove(path)) {
+                       LOGE("[ERROR] Fail to Remove engine info xml(%s)", path);
+               }
        }
        LOGD("===");
        return 0;
index 018f8ea..715d186 100644 (file)
@@ -1,4 +1,4 @@
 [D-BUS Service]
 Name=org.tizen.voice.ttsnotiserver
-Exec=/bin/sh -c "voice_getengine get user db/voice/tts/engine/default | awk '{print$5}' | xargs -t -i launch_app {}-noti mode noti"
+Exec=/bin/sh -c "voice_getengine get system db/voice/tts/engine/default | awk '{print$5}' | xargs -t -i launch_app {}-noti mode noti"
 #Exec=/bin/sh -c "launch_app org.tizen.tts-engine-default-noti mode noti"
index 432e4f9..4a92dde 100644 (file)
@@ -1,4 +1,4 @@
 [D-BUS Service]
 Name=org.tizen.voice.ttsserver
-Exec=/bin/sh -c "voice_getengine get user db/voice/tts/engine/default | awk '{print$5}' | xargs -t -i launch_app {}"
+Exec=/bin/sh -c "voice_getengine get system db/voice/tts/engine/default | awk '{print$5}' | xargs -t -i launch_app {}"
 #Exec=/bin/sh -c "launch_app org.tizen.tts-engine-default"
index 80b6f77..119f965 100644 (file)
@@ -1,4 +1,4 @@
 [D-BUS Service]
 Name=org.tizen.voice.ttssrserver
-Exec=/bin/sh -c "voice_getengine get user db/voice/tts/engine/default | awk '{print$5}' | xargs -t -i launch_app {}-sr mode sr"
+Exec=/bin/sh -c "voice_getengine get system db/voice/tts/engine/default | awk '{print$5}' | xargs -t -i launch_app {}-sr mode sr"
 #Exec=/bin/sh -c "launch_app org.tizen.tts-engine-default-sr mode sr"
index 55c3130..11b4e91 100644 (file)
@@ -99,8 +99,6 @@ mkdir -p %{_libdir}/voice
 
 mkdir -p %{TZ_SYS_RO_SHARE}/voice/test
 
-# buxton2ctl create-string #
-buxton2ctl create-string "user" "db/voice/tts/engine/default" "org.tizen.tts-engine-default" "http://tizen.org/privilege/internal/default/public" "http://tizen.org/privilege/internal/default/platform"
 
 %postun -p /sbin/ldconfig
 
old mode 100644 (file)
new mode 100755 (executable)
index 93fdbad..a65f2a5
@@ -375,9 +375,6 @@ void __config_changed_cb(tts_config_type_e type, const char* str_param, int int_
                }
                break;
        }
-
-       default:
-               break;
        }
 
        return;
old mode 100644 (file)
new mode 100755 (executable)
index 428a356..1bcb001
@@ -41,10 +41,14 @@ static bool __tts_test_get_text_from_file(const char* path, char** text)
                return 0;
        }
 
-       fseek(fp , 0 , SEEK_END);
+       if (0 != fseek(fp , 0 , SEEK_END)) {
+               SLOG(LOG_ERROR, tts_tag(), "Fail to fseek()");
+               fclose(fp);
+               return 0;
+       }
 
        int text_len = ftell(fp);
-       if (0 >= text_len) {
+       if (0 >= text_len || 0 > text_len + 1) {
                SLOG(LOG_ERROR, tts_tag(), "File has no contents");
                fclose(fp);
                return 0;
@@ -53,7 +57,7 @@ static bool __tts_test_get_text_from_file(const char* path, char** text)
        rewind(fp);
 
        char* temp = NULL;
-       temp = (char*)calloc(1, text_len+1);
+       temp = (char*)calloc(1, text_len + 1);
 
        if (temp == NULL) {
                SLOG(LOG_ERROR, tts_tag(), "Fail to memory allocation");