]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11202 Add sanity check
authorPiotr Gregor <piotr@dataandsignal.com>
Fri, 22 Jun 2018 17:48:31 +0000 (18:48 +0100)
committerMuteesa Fred <muteesafred@hotmail.com>
Tue, 24 Jul 2018 07:21:54 +0000 (07:21 +0000)
Check value of sanity while looping over
switch_cache_db_get_db_handle_dsn() in switch_user_sql_thread.

src/switch_core_sqldb.c

index e5c493e8030f53109390cc78676430b5147f9017..49a10e06c3aa8b35f2f8bb948421175a7a7a0856 100644 (file)
@@ -2054,7 +2054,7 @@ static void *SWITCH_THREAD_FUNC switch_user_sql_thread(switch_thread_t *thread,
        switch_sql_queue_manager_t *qm = (switch_sql_queue_manager_t *) obj;
        uint32_t i;
 
-       while (!qm->event_db) {
+       while (sanity && !qm->event_db) {
                if (switch_cache_db_get_db_handle_dsn(&qm->event_db, qm->dsn) == SWITCH_STATUS_SUCCESS && qm->event_db)
                        break;
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "%s Error getting db handle, Retrying\n", qm->name);