From c8c320119511899905f79b296c61592595ed2187 Mon Sep 17 00:00:00 2001 From: Mathieu Rene Date: Thu, 5 Mar 2009 03:30:48 +0000 Subject: [PATCH] oops git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12435 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_xml_config.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/switch_xml_config.c b/src/switch_xml_config.c index 863bc428c7..3996f9e365 100644 --- a/src/switch_xml_config.c +++ b/src/switch_xml_config.c @@ -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_create(&event, SWITCH_EVENT_REQUEST_PARAMS); switch_assert(event); - int file_count = 0, + int file_count = 0, matched_count = 0; 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++) { @@ -98,10 +99,13 @@ switch_status_t switch_xml_config_parse(switch_xml_t xml, int reload, switch_xml } break; case SWITCH_CONFIG_CUSTOM: +#if 0 { + switch_xml_config_callback_t callback = (switch_xml_config_callback_t)item->data; callback(item); } +#endif break; 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); return SWITCH_STATUS_SUCCESS;