mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-17 06:48:33 +00:00
MODAPP-387
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16278 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
8912b80e13
commit
e5cadc5196
9 files changed
+32
-21
No files matched your search
@@ -93,7 +93,7 @@ static switch_cache_db_handle_t *cidlookup_get_db_handle(void)
|
||||
switch_cache_db_connection_options_t options = { {0} };
|
||||
switch_cache_db_handle_t *dbh = NULL;
|
||||
|
||||
if (globals.odbc_dsn && globals.odbc_user && globals.odbc_pass) {
|
||||
if (!zstr(globals.odbc_dsn)) {
|
||||
options.odbc_options.dsn = globals.odbc_dsn;
|
||||
options.odbc_options.user = globals.odbc_user;
|
||||
options.odbc_options.pass = globals.odbc_pass;
|
||||
|
||||
@@ -289,7 +289,7 @@ switch_cache_db_handle_t *fifo_get_db_handle(void)
|
||||
switch_cache_db_connection_options_t options = { {0} };
|
||||
switch_cache_db_handle_t *dbh = NULL;
|
||||
|
||||
if (globals.odbc_dsn && globals.odbc_user && globals.odbc_pass) {
|
||||
if (!zstr(globals.odbc_dsn)) {
|
||||
options.odbc_options.dsn = globals.odbc_dsn;
|
||||
options.odbc_options.user = globals.odbc_user;
|
||||
options.odbc_options.pass = globals.odbc_pass;
|
||||
@@ -1873,8 +1873,6 @@ static switch_status_t load_config(int reload, int del_all)
|
||||
{
|
||||
char *cf = "fifo.conf";
|
||||
switch_xml_t cfg, xml, fifo, fifos, member, settings, param;
|
||||
char *odbc_user = NULL;
|
||||
char *odbc_pass = NULL;
|
||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||
char *sql;
|
||||
switch_bool_t delete_all_outbound_member_on_startup = SWITCH_FALSE;
|
||||
@@ -1913,7 +1911,7 @@ static switch_status_t load_config(int reload, int del_all)
|
||||
}
|
||||
}
|
||||
|
||||
if (zstr(globals.odbc_dsn) || zstr(odbc_user) || zstr(odbc_pass)) {
|
||||
if (zstr(globals.odbc_dsn)) {
|
||||
globals.dbname = "fifo";
|
||||
}
|
||||
|
||||
|
||||
@@ -394,7 +394,7 @@ static switch_cache_db_handle_t *lcr_get_db_handle(void)
|
||||
switch_cache_db_connection_options_t options = { {0} };
|
||||
switch_cache_db_handle_t *dbh = NULL;
|
||||
|
||||
if (globals.odbc_dsn && globals.odbc_user && globals.odbc_pass) {
|
||||
if (!zstr(globals.odbc_dsn)) {
|
||||
options.odbc_options.dsn = globals.odbc_dsn;
|
||||
options.odbc_options.user = globals.odbc_user;
|
||||
options.odbc_options.pass = globals.odbc_pass;
|
||||
|
||||
@@ -95,7 +95,7 @@ switch_cache_db_handle_t *limit_get_db_handle(void)
|
||||
switch_cache_db_connection_options_t options = { {0} };
|
||||
switch_cache_db_handle_t *dbh = NULL;
|
||||
|
||||
if (globals.odbc_dsn && globals.odbc_user && globals.odbc_pass) {
|
||||
if (!zstr(globals.odbc_dsn)) {
|
||||
options.odbc_options.dsn = globals.odbc_dsn;
|
||||
options.odbc_options.user = globals.odbc_user;
|
||||
options.odbc_options.pass = globals.odbc_pass;
|
||||
@@ -205,7 +205,7 @@ static switch_status_t do_config()
|
||||
}
|
||||
|
||||
|
||||
if (zstr(globals.odbc_dsn) || zstr(globals.odbc_user) || zstr(globals.odbc_pass)) {
|
||||
if (zstr(globals.odbc_dsn)) {
|
||||
globals.dbname = "call_limit";
|
||||
dbh = limit_get_db_handle();
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ switch_cache_db_handle_t *vm_get_db_handle(vm_profile_t *profile)
|
||||
switch_cache_db_connection_options_t options = { {0} };
|
||||
switch_cache_db_handle_t *dbh = NULL;
|
||||
|
||||
if (profile->odbc_dsn && profile->odbc_user && profile->odbc_pass) {
|
||||
if (!zstr(profile->odbc_dsn)) {
|
||||
options.odbc_options.dsn = profile->odbc_dsn;
|
||||
options.odbc_options.user = profile->odbc_user;
|
||||
options.odbc_options.pass = profile->odbc_pass;
|
||||
|
||||
Reference in new issue
Block a user