From 612356b7b608e2d128f1af5fea8cbea21d919955 Mon Sep 17 00:00:00 2001 From: Rupa Schomaker Date: Mon, 5 Jul 2010 11:11:22 -0500 Subject: [PATCH] Revert "switch to switch_cache_db_dismiss_db_handle to reduce odbc" This reverts commit ab3d7d144e28847a67eac968cf3c5d21b32bdaa0. --- src/mod/applications/mod_cidlookup/mod_cidlookup.c | 4 ++-- src/mod/applications/mod_db/mod_db.c | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) mode change 100644 => 100755 src/mod/applications/mod_cidlookup/mod_cidlookup.c diff --git a/src/mod/applications/mod_cidlookup/mod_cidlookup.c b/src/mod/applications/mod_cidlookup/mod_cidlookup.c old mode 100644 new mode 100755 index 76239cba0c..230c48ac8d --- a/src/mod/applications/mod_cidlookup/mod_cidlookup.c +++ b/src/mod/applications/mod_cidlookup/mod_cidlookup.c @@ -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_dismiss_db_handle(&dbh); + switch_cache_db_release_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_dismiss_db_handle(&dbh); + switch_cache_db_release_db_handle(&dbh); return retval; } diff --git a/src/mod/applications/mod_db/mod_db.c b/src/mod/applications/mod_db/mod_db.c index 2678b4da38..d22f1a8eec 100644 --- a/src/mod/applications/mod_db/mod_db.c +++ b/src/mod/applications/mod_db/mod_db.c @@ -122,7 +122,7 @@ static switch_status_t limit_execute_sql(char *sql) end: - switch_cache_db_dismiss_db_handle(&dbh); + switch_cache_db_release_db_handle(&dbh); return status; } @@ -148,7 +148,7 @@ static switch_bool_t limit_execute_sql_callback(char *sql, switch_core_db_callba end: - switch_cache_db_dismiss_db_handle(&dbh); + switch_cache_db_release_db_handle(&dbh); return ret; } @@ -344,7 +344,6 @@ static switch_status_t do_config() sql = switch_mprintf("delete from limit_data where hostname='%q';", globals.hostname); limit_execute_sql(sql); switch_safe_free(sql); - switch_cache_db_dismiss_db_handle(&dbh); /* try to really free the connection */ } return status;