提交 bed36985 authored 作者: Michael Jerris's avatar Michael Jerris

tweak

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12498 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 97412d0e
...@@ -284,7 +284,7 @@ SWITCH_DECLARE(switch_status_t) switch_xml_config_parse_event(switch_event_t *ev ...@@ -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; switch_xml_config_enum_item_t *enum_options = (switch_xml_config_enum_item_t*)item->data;
int *dest = (int*)item->ptr; int *dest = (int*)item->ptr;
int newval = 0; int newval = 0;
switch_status_t lookup_result; switch_status_t lookup_result = SWITCH_STATUS_SUCCESS;
if (value) { if (value) {
lookup_result = switch_xml_config_enum_str2int(enum_options, value, &newval); 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 ...@@ -292,7 +292,7 @@ SWITCH_DECLARE(switch_status_t) switch_xml_config_parse_event(switch_event_t *ev
newval = (int)(intptr_t)item->defaultvalue; newval = (int)(intptr_t)item->defaultvalue;
} }
if (value != SWITCH_STATUS_SUCCESS) { if (lookup_result != SWITCH_STATUS_SUCCESS) {
newval = (int)(intptr_t)item->defaultvalue; 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_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); switch_xml_config_item_print_doc(SWITCH_LOG_ERROR, item);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论