提交 9b6501dd authored 作者: Michael Jerris's avatar Michael Jerris

fix mod_yaml build on newer gcc

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9381 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 ae4e0df8
...@@ -106,6 +106,15 @@ SWITCH_DECLARE(switch_size_t) switch_fd_read_line(int fd, char *buf, switch_size ...@@ -106,6 +106,15 @@ SWITCH_DECLARE(switch_size_t) switch_fd_read_line(int fd, char *buf, switch_size
!strcasecmp(expr, "allow") ||\ !strcasecmp(expr, "allow") ||\
atoi(expr))) ? SWITCH_TRUE : SWITCH_FALSE atoi(expr))) ? SWITCH_TRUE : SWITCH_FALSE
#define switch_true_buf(expr)\
(( !strcasecmp(expr, "yes") ||\
!strcasecmp(expr, "on") ||\
!strcasecmp(expr, "true") ||\
!strcasecmp(expr, "enabled") ||\
!strcasecmp(expr, "active") ||\
!strcasecmp(expr, "allow") ||\
atoi(expr))) ? SWITCH_TRUE : SWITCH_FALSE
/*! /*!
\brief Evaluate the falsefullness of a string expression \brief Evaluate the falsefullness of a string expression
\param expr a string expression \param expr a string expression
......
...@@ -476,7 +476,7 @@ static switch_status_t do_config(void) ...@@ -476,7 +476,7 @@ static switch_status_t do_config(void)
} else { } else {
switch_set_string(value, scalar_data); switch_set_string(value, scalar_data);
if (!strcasecmp(category, "settings")) { if (!strcasecmp(category, "settings")) {
if (!strcasecmp(name, "bind_config") && switch_true(value)) { if (!strcasecmp(name, "bind_config") && switch_true_buf(value)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Binding To XML Config\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Binding To XML Config\n");
switch_xml_bind_search_function(yaml_fetch, switch_xml_parse_section_string("config"), NULL); switch_xml_bind_search_function(yaml_fetch, switch_xml_parse_section_string("config"), NULL);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论