From bd41ecc3968b03b3894b7da641e25f5c9135cae0 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 12 Sep 2013 01:29:32 +0500 Subject: [PATCH] FS-5779 --resolve --- src/switch_xml.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/switch_xml.c b/src/switch_xml.c index de171a933e..abe0826613 100644 --- a/src/switch_xml.c +++ b/src/switch_xml.c @@ -1639,8 +1639,10 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_parse_file(const char *file) write_fd = NULL; if ((fd = open(new_file, O_RDONLY, 0)) > -1) { if ((xml = switch_xml_parse_fd(fd))) { - xml->free_path = new_file; - new_file = NULL; + if (strcmp(file, SWITCH_GLOBAL_filenames.conf_name)) { + xml->free_path = new_file; + new_file = NULL; + } } close(fd); fd = -1; @@ -2742,10 +2744,8 @@ SWITCH_DECLARE(void) switch_xml_free(switch_xml_t xml) } if (xml->free_path) { - if (!switch_stristr("freeswitch.xml.fsxml", xml->free_path)) { - if (unlink(xml->free_path) != 0) { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Failed to delete file [%s]\n", xml->free_path); - } + if (unlink(xml->free_path) != 0) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Failed to delete file [%s]\n", xml->free_path); } switch_safe_free(xml->free_path); }