[Freeswitch-svn] [commit] r5977 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Thu Oct 18 15:49:14 EDT 2007


Author: anthm
Date: Thu Oct 18 15:49:13 2007
New Revision: 5977

Modified:
   freeswitch/trunk/src/switch_xml.c

Log:
close FSCORE-54

Modified: freeswitch/trunk/src/switch_xml.c
==============================================================================
--- freeswitch/trunk/src/switch_xml.c	(original)
+++ freeswitch/trunk/src/switch_xml.c	Thu Oct 18 15:49:13 2007
@@ -1291,6 +1291,8 @@
 	return MAIN_XML_ROOT;
 }
 
+static char not_so_threadsafe_error_buffer[256] = "";
+
 SWITCH_DECLARE(switch_xml_t) switch_xml_open_root(uint8_t reload, const char **err)
 {
 	char path_buf[1024];
@@ -1312,7 +1314,8 @@
 	snprintf(path_buf, sizeof(path_buf), "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "freeswitch.xml");
 	if ((new_main = switch_xml_parse_file(path_buf))) {
 		*err = switch_xml_error(new_main);
-
+		switch_copy_string(not_so_threadsafe_error_buffer, *err, sizeof(not_so_threadsafe_error_buffer));
+		*err = not_so_threadsafe_error_buffer;
 		if (!switch_strlen_zero(*err)) {
 			switch_xml_free(new_main);
 			new_main = NULL;



More information about the Freeswitch-svn mailing list