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

src/include/switch_xml_config.h
src/switch_xml_config.c

index 016aa42b534a8c0dd6cc64b48f813caab1aa6810..2371c2df95f76d72fadb35c7f79faf8bb2bf07dd 100644 (file)
@@ -87,7 +87,7 @@ struct switch_xml_config_item {
  * \param options instrutions on how to parse the elements
  * \see switch_xml_config_item_t
  */
-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);
 
 #endif /* !defined(SWITCH_XML_CONFIG_H) */
 
index d05aef471f4173f0355bef5b3d2a0cb665b8e33d..02e9be1db2853bdd7c561845dbd68d33e56693f8 100644 (file)
@@ -77,13 +77,13 @@ 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 (options->length > 0) {
+                                       if (string_options->length > 0) {
                                                /* We have a preallocated buffer */
                                                char *dest = (char*)item->ptr;
                                                if (value) {
                                                        switch_copy_string(dest, value, string_options->length);
-                                               } else if (options->defaultvalue){
-                                                       switch_copy_string(dest, value, string_options->length);
+                                               } else if (item->defaultvalue){
+                                                       switch_copy_string(dest, item->defaultvalue, string_options->length);
                                                }
                                        } else {
                                                char **dest = (char**)item->ptr;
@@ -145,7 +145,7 @@ SWITCH_DECLARE(switch_status_t) switch_xml_config_parse(switch_xml_t xml, int re
                        case SWITCH_CONFIG_FLAG:
                                {
                                        int32_t *dest = (int32_t*)item->ptr;
-                                       int index = (int)item->data;
+                                       int index = (int)(intptr_t)item->data;
                                        if (value) {
                                                if (switch_true(value)) {
                                                        *dest |= (1 << index);
@@ -164,7 +164,7 @@ SWITCH_DECLARE(switch_status_t) switch_xml_config_parse(switch_xml_t xml, int re
                        case SWITCH_CONFIG_FLAGARRAY:
                                {
                                        int8_t *dest = (int8_t*)item->ptr;
-                                       int index = (int)item->data;
+                                       int index = (int)(intptr_t)item->data;
                                        if (value) {
                                                dest[index] = !!switch_true(value);                                             
                                        } else {