提交 f7cd36c0 authored 作者: Mathieu Rene's avatar Mathieu Rene

avoid (null) confusion

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12499 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 bed36985
...@@ -215,8 +215,12 @@ SWITCH_DECLARE(switch_status_t) switch_xml_config_parse_event(switch_event_t *ev ...@@ -215,8 +215,12 @@ SWITCH_DECLARE(switch_status_t) switch_xml_config_parse_event(switch_event_t *ev
newstring = value; /* Regex match, accept value*/ newstring = value; /* Regex match, accept value*/
} else { } else {
newstring = (char*)item->defaultvalue; /* Regex failed */ newstring = (char*)item->defaultvalue; /* Regex failed */
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid value [%s] for parameter [%s], setting default [%s]\n", if (newstring) {
value, item->key, newstring ? newstring : "(null)"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid value [%s] for parameter [%s], setting default [%s]\n",
value, item->key, newstring);
} else {
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);
} }
} else { } else {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论