mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-09 09:17:34 +00:00
share handles when not using sqlite
This commit is contained in:
parent
6bd82d1fb4
commit
e11560ddf3
@ -77,7 +77,7 @@ SWITCH_DECLARE(switch_status_t) _switch_core_db_handle(switch_cache_db_handle_t
|
||||
}
|
||||
|
||||
|
||||
#define SQL_CACHE_TIMEOUT 300
|
||||
#define SQL_CACHE_TIMEOUT 120
|
||||
|
||||
static void sql_close(time_t prune)
|
||||
{
|
||||
@ -155,6 +155,17 @@ SWITCH_DECLARE(void) switch_cache_db_flush_handles(void)
|
||||
SWITCH_DECLARE(void) switch_cache_db_release_db_handle(switch_cache_db_handle_t ** dbh)
|
||||
{
|
||||
if (dbh && *dbh) {
|
||||
|
||||
switch ((*dbh)->type) {
|
||||
case SCDB_TYPE_ODBC:
|
||||
{
|
||||
switch_clear_flag((*dbh), CDF_INUSE);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
switch_mutex_unlock((*dbh)->mutex);
|
||||
*dbh = NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user