mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-13 13:07:06 +00:00
supress errors caused from -nosql as reported on the mailing list and not on JIRA like it should be http://jira.freeswitch.org
This commit is contained in:
1 parent
ee0a0b79c8
commit
1cbb8f221b
2 files changed
+18
-1
No files matched your search
+13
-1
@@ -922,7 +922,7 @@ static void *SWITCH_THREAD_FUNC switch_core_sql_db_thread(switch_thread_t *threa
|
||||
sec = 0;
|
||||
}
|
||||
|
||||
if (++reg_sec == SQL_REG_TIMEOUT) {
|
||||
if (switch_test_flag((&runtime), SCF_USE_SQL) && ++reg_sec == SQL_REG_TIMEOUT) {
|
||||
switch_core_expire_registration(0);
|
||||
reg_sec = 0;
|
||||
}
|
||||
@@ -1648,6 +1648,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_add_registration(const char *user, c
|
||||
switch_cache_db_handle_t *dbh;
|
||||
char *sql;
|
||||
|
||||
if (!switch_test_flag((&runtime), SCF_USE_SQL)) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
if (switch_core_db_handle(&dbh) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB!\n");
|
||||
return SWITCH_STATUS_FALSE;
|
||||
@@ -1691,6 +1695,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_del_registration(const char *user, c
|
||||
switch_cache_db_handle_t *dbh;
|
||||
char *sql;
|
||||
|
||||
if (!switch_test_flag((&runtime), SCF_USE_SQL)) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
if (switch_core_db_handle(&dbh) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB!\n");
|
||||
return SWITCH_STATUS_FALSE;
|
||||
@@ -1717,6 +1725,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_expire_registration(int force)
|
||||
char *sql;
|
||||
switch_time_t now;
|
||||
|
||||
if (!switch_test_flag((&runtime), SCF_USE_SQL)) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
if (switch_core_db_handle(&dbh) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB!\n");
|
||||
return SWITCH_STATUS_FALSE;
|
||||
|
||||
Reference in new issue
Block a user