MODAPP-346 - segfault on no dsn

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15019 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Rupa Schomaker 2009-09-30 12:25:28 +00:00
parent 978c6bdebe
commit 16b689d937

View File

@ -95,11 +95,11 @@ static switch_status_t config_callback_dsn(switch_xml_config_item_t *data, const
}
if ((callback_type == CONFIG_LOAD || callback_type == CONFIG_RELOAD) && changed) {
odbc_dsn = strdup(newvalue);
if(switch_strlen_zero(odbc_dsn)) {
if(switch_strlen_zero(newvalue)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "No local database defined.\n");
} else {
odbc_dsn = strdup(newvalue);
if ((odbc_user = strchr(odbc_dsn, ':'))) {
*odbc_user++ = '\0';
if ((odbc_pass = strchr(odbc_user, ':'))) {