[Freeswitch-svn] [commit] r12442 - in freeswitch/trunk/src: . include

FreeSWITCH SVN mrene at freeswitch.org
Wed Mar 4 20:30:15 PST 2009


Author: mrene
Date: Wed Mar  4 22:30:15 2009
New Revision: 12442

Log:
update

Modified:
   freeswitch/trunk/src/include/switch_xml_config.h
   freeswitch/trunk/src/switch_xml_config.c

Modified: freeswitch/trunk/src/include/switch_xml_config.h
==============================================================================
--- freeswitch/trunk/src/include/switch_xml_config.h	(original)
+++ freeswitch/trunk/src/include/switch_xml_config.h	Wed Mar  4 22:30:15 2009
@@ -87,7 +87,7 @@
  * \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) */
 

Modified: freeswitch/trunk/src/switch_xml_config.c
==============================================================================
--- freeswitch/trunk/src/switch_xml_config.c	(original)
+++ freeswitch/trunk/src/switch_xml_config.c	Wed Mar  4 22:30:15 2009
@@ -77,13 +77,13 @@
 			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 @@
 			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 @@
 			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 {



More information about the Freeswitch-svn mailing list