FS-2050 Core ODBC support for transactions with MSSQL

This commit is contained in:
Jeff Lenk
2010-10-21 16:18:54 -05:00
parent fd1736b38f
commit d2ca8d4046
6 changed files with 85 additions and 6 deletions

View File

@@ -1237,6 +1237,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc
runtime.max_dtmf_duration = SWITCH_MAX_DTMF_DURATION;
runtime.default_dtmf_duration = SWITCH_DEFAULT_DTMF_DURATION;
runtime.min_dtmf_duration = SWITCH_MIN_DTMF_DURATION;
runtime.odbc_dbtype = DBTYPE_DEFAULT;
/* INIT APR and Create the pool context */
if (apr_initialize() != SWITCH_STATUS_SUCCESS) {
@@ -1590,6 +1591,12 @@ static void switch_load_core_config(const char *file)
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ODBC IS NOT AVAILABLE!\n");
}
} else if (!strcasecmp(var, "core-dbtype") && !zstr(val)) {
if (!strcasecmp(val, "MSSQL")) {
runtime.odbc_dbtype = DBTYPE_MSSQL;
} else {
runtime.odbc_dbtype = DBTYPE_DEFAULT;
}
#ifdef ENABLE_ZRTP
} else if (!strcasecmp(var, "rtp-enable-zrtp")) {
switch_core_set_variable("zrtp_enabled", val);