]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorMathieu Rene <mrene@avgs.ca>
Thu, 5 Mar 2009 04:23:54 +0000 (04:23 +0000)
committerMathieu Rene <mrene@avgs.ca>
Thu, 5 Mar 2009 04:23:54 +0000 (04:23 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12441 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_xml_config.c

index 1e015162be8f4768a69983d435e50bb0c135652f..d05aef471f4173f0355bef5b3d2a0cb665b8e33d 100644 (file)
@@ -34,7 +34,7 @@
 
 #include <switch.h>
 
-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);
                                                }