fix MODENDP-35

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6275 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2007-11-15 16:55:46 +00:00
parent a62373c784
commit a30c635e2a
8 changed files with 42 additions and 40 deletions

View File

@@ -202,14 +202,14 @@ static switch_status_t do_config()
var = (char *) switch_xml_attr_soft(param, "name");
val = (char *) switch_xml_attr_soft(param, "value");
if (!strcasecmp(var, "odbc-dsn")) {
if (!strcasecmp(var, "odbc-dsn") && !switch_strlen_zero(val)) {
#ifdef SWITCH_HAVE_ODBC
globals.odbc_dsn = switch_core_strdup(globals.pool, val);
if ((odbc_user = strchr(globals.odbc_dsn, ':'))) {
*odbc_user++ = '\0';
}
if ((odbc_pass = strchr(odbc_user, ':'))) {
*odbc_pass++ = '\0';
if ((odbc_pass = strchr(odbc_user, ':'))) {
*odbc_pass++ = '\0';
}
}
#else
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ODBC IS NOT AVAILABLE!\n");