avoid (null) confusion

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12499 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Mathieu Rene 2009-03-07 06:50:10 +00:00
parent bed36985dd
commit f7cd36c0b0
1 changed files with 6 additions and 2 deletions

View File

@ -215,8 +215,12 @@ SWITCH_DECLARE(switch_status_t) switch_xml_config_parse_event(switch_event_t *ev
newstring = value; /* Regex match, accept value*/
} else {
newstring = (char*)item->defaultvalue; /* Regex failed */
if (newstring) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid value [%s] for parameter [%s], setting default [%s]\n",
value, item->key, newstring ? newstring : "(null)");
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);
}
} else {