mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-12 21:24:14 +00:00
oops
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12435 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
10fb9485f5
commit
c8c3201195
@ -39,10 +39,11 @@ switch_status_t switch_xml_config_parse(switch_xml_t xml, int reload, switch_xml
|
|||||||
switch_event_t *event;
|
switch_event_t *event;
|
||||||
switch_event_create(&event, SWITCH_EVENT_REQUEST_PARAMS);
|
switch_event_create(&event, SWITCH_EVENT_REQUEST_PARAMS);
|
||||||
switch_assert(event);
|
switch_assert(event);
|
||||||
int file_count = 0,
|
int file_count = 0, matched_count = 0;
|
||||||
|
|
||||||
for (node = xml; node; node = node->next) {
|
for (node = xml; node; node = node->next) {
|
||||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, switch_xml_attr_soft(node, "name"); switch_xml_attr_soft(node, "value"));
|
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, switch_xml_attr_soft(node, "name"), switch_xml_attr_soft(node, "value"));
|
||||||
|
file_count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (item = options; item->key; item++) {
|
for (item = options; item->key; item++) {
|
||||||
@ -98,10 +99,13 @@ switch_status_t switch_xml_config_parse(switch_xml_t xml, int reload, switch_xml
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SWITCH_CONFIG_CUSTOM:
|
case SWITCH_CONFIG_CUSTOM:
|
||||||
|
#if 0
|
||||||
{
|
{
|
||||||
|
|
||||||
switch_xml_config_callback_t callback = (switch_xml_config_callback_t)item->data;
|
switch_xml_config_callback_t callback = (switch_xml_config_callback_t)item->data;
|
||||||
callback(item);
|
callback(item);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case SWITCH_CONFIG_ENUM:
|
case SWITCH_CONFIG_ENUM:
|
||||||
{
|
{
|
||||||
@ -160,6 +164,10 @@ switch_status_t switch_xml_config_parse(switch_xml_t xml, int reload, switch_xml
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (file_count > matched_count) {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Config file had %d params but only %d were valid\n", file_count, matched_count);
|
||||||
|
}
|
||||||
|
|
||||||
switch_event_destroy(&event);
|
switch_event_destroy(&event);
|
||||||
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user