Remove stt-config in RW when xmlParseFile is failed 98/203498/1
authorsooyeon.kim <sooyeon.kim@samsung.com>
Fri, 18 Jan 2019 01:40:58 +0000 (10:40 +0900)
committerSooyeon Kim <sooyeon.kim@samsung.com>
Mon, 15 Apr 2019 08:55:05 +0000 (08:55 +0000)
Change-Id: Iaec7903f9f6540bc8266648c7b4a060c072e7e04
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
(cherry picked from commit 276468714b0b8f73a3e557a3f905fb981ac1b81f)

common/stt_config_parser.c

index 8b45fc3..b179ffc 100644 (file)
@@ -352,6 +352,9 @@ int stt_parser_load_config(stt_config_s** config_info)
 
                        if (STT_RETRY_COUNT == retry_count) {
                                SLOG(LOG_ERROR, stt_tag(), "[ERROR] Fail to parse file error : %s", STT_CONFIG);
+                               SLOG(LOG_ERROR, stt_tag(), "[ERROR] Remove the file");
+                               remove(STT_CONFIG);
+
                                doc = xmlParseFile(STT_DEFAULT_CONFIG);
                                if (NULL == doc) {
                                        SLOG(LOG_ERROR, stt_tag(), "[ERROR] Fail to parse file error : %s", STT_DEFAULT_CONFIG);