From 18d45d603918e284727b284e8b1826403ac8291c Mon Sep 17 00:00:00 2001 From: Mathieu Rene Date: Thu, 5 Mar 2009 04:23:54 +0000 Subject: [PATCH] update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12441 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_xml_config.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/switch_xml_config.c b/src/switch_xml_config.c index 1e015162be..d05aef471f 100644 --- a/src/switch_xml_config.c +++ b/src/switch_xml_config.c @@ -34,7 +34,7 @@ #include -SWITCH_DECLARE(switch_status_t) switch_xml_config_parse(switch_xml_t xml, int reload, switch_xml_config_item_t *options) +SWITCH_DECLARE(switch_status_t) switch_xml_config_parse(switch_xml_t xml, int reload, switch_xml_config_item_t *instructions) { switch_xml_config_item_t *item; switch_xml_t node; @@ -50,7 +50,7 @@ SWITCH_DECLARE(switch_status_t) switch_xml_config_parse(switch_xml_t xml, int re file_count++; } - for (item = options; item->key; item++) { + for (item = instructions; item->key; item++) { const char *value = switch_event_get_header(event, item->key); if (reload && !item->reloadable) { @@ -77,7 +77,7 @@ SWITCH_DECLARE(switch_status_t) switch_xml_config_parse(switch_xml_t xml, int re case SWITCH_CONFIG_STRING: { switch_xml_config_string_options_t *string_options = (switch_xml_config_string_options_t*)item->data; - if (string_options->length > 0) { + if (options->length > 0) { /* We have a preallocated buffer */ char *dest = (char*)item->ptr; if (value) { @@ -122,18 +122,18 @@ SWITCH_DECLARE(switch_status_t) switch_xml_config_parse(switch_xml_t xml, int re break; case SWITCH_CONFIG_ENUM: { - switch_xml_config_enum_item_t *options = (switch_xml_config_enum_item_t*)item->data; + switch_xml_config_enum_item_t *enum_options = (switch_xml_config_enum_item_t*)item->data; int *dest = (int*)item->ptr; if (value) { - for (;options->key; options++) { - if (!strcasecmp(value, options->key)) { - *dest = options->value; + for (;enum_options->key; enum_options++) { + if (!strcasecmp(value, enum_options->key)) { + *dest = enum_options->value; break; } } - if (!options->key) { /* if (!found) */ + if (!enum_options->key) { /* if (!found) */ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid value [%s] for parameter [%s]\n", value, item->key); }