+
+int tts_parser_reset()
+{
+ SLOG(LOG_DEBUG, tts_tag(), "[DEBUG] Reset g_config_doc as %s", TTS_DEFAULT_CONFIG);
+
+ if (NULL != g_config_doc) {
+ xmlFreeDoc(g_config_doc);
+ g_config_doc = NULL;
+ }
+
+ g_config_doc = xmlParseFile(TTS_DEFAULT_CONFIG);
+ if (NULL == g_config_doc) {
+ SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to parse %s", TTS_DEFAULT_CONFIG);
+ return -1;
+ }
+
+ int ret = xmlSaveFile(TTS_CONFIG, g_config_doc);
+ if (0 > ret) {
+ SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to save %s", TTS_CONFIG);
+ }
+
+ return 0;
+}