mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-06 18:30:01 +00:00
FS-5779 --resolve
This commit is contained in:
parent
439e582dc6
commit
5714ca0d18
@ -1639,9 +1639,11 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_parse_file(const char *file)
|
|||||||
write_fd = NULL;
|
write_fd = NULL;
|
||||||
if ((fd = open(new_file, O_RDONLY, 0)) > -1) {
|
if ((fd = open(new_file, O_RDONLY, 0)) > -1) {
|
||||||
if ((xml = switch_xml_parse_fd(fd))) {
|
if ((xml = switch_xml_parse_fd(fd))) {
|
||||||
|
if (strcmp(file, SWITCH_GLOBAL_filenames.conf_name)) {
|
||||||
xml->free_path = new_file;
|
xml->free_path = new_file;
|
||||||
new_file = NULL;
|
new_file = NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
fd = -1;
|
fd = -1;
|
||||||
}
|
}
|
||||||
@ -2742,11 +2744,9 @@ SWITCH_DECLARE(void) switch_xml_free(switch_xml_t xml)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (xml->free_path) {
|
if (xml->free_path) {
|
||||||
if (!switch_stristr("freeswitch.xml.fsxml", xml->free_path)) {
|
|
||||||
if (unlink(xml->free_path) != 0) {
|
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_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Failed to delete file [%s]\n", xml->free_path);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
switch_safe_free(xml->free_path);
|
switch_safe_free(xml->free_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user