[Freeswitch-svn] [commit] r12498 - freeswitch/trunk/src

FreeSWITCH SVN mikej at freeswitch.org
Fri Mar 6 22:45:14 PST 2009


Author: mikej
Date: Sat Mar  7 00:45:14 2009
New Revision: 12498

Log:
tweak

Modified:
   freeswitch/trunk/src/switch_xml_config.c

Modified: freeswitch/trunk/src/switch_xml_config.c
==============================================================================
--- freeswitch/trunk/src/switch_xml_config.c	(original)
+++ freeswitch/trunk/src/switch_xml_config.c	Sat Mar  7 00:45:14 2009
@@ -284,7 +284,7 @@
 					switch_xml_config_enum_item_t *enum_options = (switch_xml_config_enum_item_t*)item->data;
 					int *dest = (int*)item->ptr;
 					int newval = 0;
-					switch_status_t lookup_result;
+					switch_status_t lookup_result = SWITCH_STATUS_SUCCESS;
 					
 					if (value) {
 						lookup_result = switch_xml_config_enum_str2int(enum_options, value, &newval);
@@ -292,7 +292,7 @@
 						newval = (int)(intptr_t)item->defaultvalue; 
 					}
 					
-					if (value != SWITCH_STATUS_SUCCESS) {
+					if (lookup_result != SWITCH_STATUS_SUCCESS) {
 						newval = (int)(intptr_t)item->defaultvalue;
 						switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid value [%s] for parameter [%s]\n",  value, item->key);
 						switch_xml_config_item_print_doc(SWITCH_LOG_ERROR, item);



More information about the Freeswitch-svn mailing list