switch to switch_cache_db_dismiss_db_handle to reduce odbc

usage under heavy switch load
This commit is contained in:
Rupa Schomaker committed 2010-06-29 16:00:44 -05:00
1 parent 98a436bb27
commit ab3d7d144e
2 files changed
+5 -4

No files matched your search

+2 -2
View File
@@ -143,7 +143,7 @@ static switch_status_t config_callback_dsn(switch_xml_config_item_t *data, const
switch_goto_status(SWITCH_STATUS_SUCCESS, done);
done:
switch_cache_db_release_db_handle(&dbh);
switch_cache_db_dismiss_db_handle(&dbh);
return status;
}
@@ -198,7 +198,7 @@ static switch_bool_t cidlookup_execute_sql_callback(char *sql, switch_core_db_ca
*err = switch_core_sprintf(cbt->pool, "Unable to get ODBC handle. dsn: %s, dbh is %s\n", globals.odbc_dsn, dbh ? "not null" : "null");
}
switch_cache_db_release_db_handle(&dbh);
switch_cache_db_dismiss_db_handle(&dbh);
return retval;
}