!strcasecmp(expr, "allow") ||\
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
\param expr a string expression
} else {
switch_set_string(value, scalar_data);
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_xml_bind_search_function(yaml_fetch, switch_xml_parse_section_string("config"), NULL);
}