提交 d78200dc authored 作者: Michael Jerris's avatar Michael Jerris

fix mod_yaml build on newer gcc

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9382 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 9b6501dd
...@@ -276,6 +276,9 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_set_attr(switch_xml_t xml, const char *n ...@@ -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) \ #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))) 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 ///\brief sets a flag for the given tag and returns the tag
///\param xml the xml node ///\param xml the xml node
///\param flag the flag to set ///\param flag the flag to set
......
...@@ -154,7 +154,7 @@ static switch_xml_t parse_file(FILE *input, const char *file_name) ...@@ -154,7 +154,7 @@ static switch_xml_t parse_file(FILE *input, const char *file_name)
} else { } else {
switch_set_string(value, scalar_data); switch_set_string(value, scalar_data);
param = switch_xml_add_child_d(current, "param", p_off++); 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); switch_xml_set_attr_d(param, "value", scalar_data);
nv = 0; nv = 0;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论