change odbc handling in code to be runtime instead of build time

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13936 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris committed 2009-06-24 16:02:43 +00:00
1 parent f7d99cf948
commit 6348359d95
25 files changed
+262 -379

No files matched your search

+1 -6
View File
@@ -581,22 +581,17 @@ void sofia_reg_check_expire(sofia_profile_t *profile, time_t now, int reboot)
{
char sql[1024];
#ifdef SWITCH_HAVE_ODBC
if (profile->odbc_dsn) {
if (switch_odbc_available() && profile->odbc_dsn) {
if (!profile->master_odbc) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB %s\n", profile->dbname);
return;
}
} else {
#endif
if (!profile->master_db) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB %s\n", profile->dbname);
return;
}
#ifdef SWITCH_HAVE_ODBC
}
#endif
switch_mutex_lock(profile->ireg_mutex);