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;
}
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);
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");
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;
[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"
[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"
[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"
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
}
break;
}
-
- default:
- break;
}
return;
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;
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");