]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix mod_yaml build on newer gcc
authorMichael Jerris <mike@jerris.com>
Thu, 28 Aug 2008 18:23:17 +0000 (18:23 +0000)
committerMichael Jerris <mike@jerris.com>
Thu, 28 Aug 2008 18:23:17 +0000 (18:23 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9382 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_xml.h
src/mod/languages/mod_yaml/mod_yaml.c

index be8a2e62f14e5006ab564835abe86eedcd66955f..6afa636d93ae9c50ebfb4cca6d3dfde5a8595e00 100644 (file)
@@ -276,6 +276,9 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_set_attr(switch_xml_t xml, const char *n
 #define switch_xml_set_attr_d(xml, name, value) \
     switch_xml_set_attr(switch_xml_set_flag(xml, SWITCH_XML_DUP), strdup(name), strdup(switch_str_nil(value)))
 
+#define switch_xml_set_attr_d_buf(xml, name, value) \
+    switch_xml_set_attr(switch_xml_set_flag(xml, SWITCH_XML_DUP), strdup(name), strdup(value))
+
 ///\brief sets a flag for the given tag and returns the tag
 ///\param xml the xml node
 ///\param flag the flag to set
index aa6137cd3f1663728dc6eb101ebdb2d778dea8f2..1bf07e801f7500ab570184d26133078f32ea888c 100644 (file)
@@ -154,7 +154,7 @@ static switch_xml_t parse_file(FILE *input, const char *file_name)
                                                } else {
                                                        switch_set_string(value, scalar_data);
                                                        param = switch_xml_add_child_d(current, "param", p_off++);
-                                                       switch_xml_set_attr_d(param, "name", name);
+                                                       switch_xml_set_attr_d_buf(param, "name", name);
                                                        switch_xml_set_attr_d(param, "value", scalar_data);
                                                        nv = 0;
                                                }