From bed36985dd17c83441b6c78b6248eff9309d5e33 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Sat, 7 Mar 2009 06:45:14 +0000 Subject: [PATCH] tweak git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12498 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_xml_config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/switch_xml_config.c b/src/switch_xml_config.c index 093500e499..d6be31b1b6 100644 --- a/src/switch_xml_config.c +++ b/src/switch_xml_config.c @@ -284,7 +284,7 @@ SWITCH_DECLARE(switch_status_t) switch_xml_config_parse_event(switch_event_t *ev 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 @@ SWITCH_DECLARE(switch_status_t) switch_xml_config_parse_event(switch_event_t *ev 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);