usage under heavy switch load
switch_goto_status(SWITCH_STATUS_SUCCESS, done);
done:
- switch_cache_db_release_db_handle(&dbh);
+ switch_cache_db_dismiss_db_handle(&dbh);
return status;
}
*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;
}
end:
- switch_cache_db_release_db_handle(&dbh);
+ switch_cache_db_dismiss_db_handle(&dbh);
return status;
}
end:
- switch_cache_db_release_db_handle(&dbh);
+ switch_cache_db_dismiss_db_handle(&dbh);
return ret;
}
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;