FS-3961 --resolve

This commit is contained in:
Anthony Minessale
2012-03-09 11:28:29 -06:00
parent b1281985d5
commit f38c287a4b
2 changed files with 18 additions and 8 deletions

View File

@@ -466,7 +466,12 @@ static switch_status_t switch_cache_db_execute_sql_real(switch_cache_db_handle_t
break;
case SCDB_TYPE_CORE_DB:
{
status = switch_core_db_exec(dbh->native_handle.core_db_dbh, sql, NULL, NULL, &errmsg);
int ret = switch_core_db_exec(dbh->native_handle.core_db_dbh, sql, NULL, NULL, &errmsg);
if (ret == SWITCH_CORE_DB_OK) {
status = SWITCH_STATUS_SUCCESS;
}
if (errmsg) {
switch_strdup(tmp, errmsg);
switch_core_db_free(errmsg);
@@ -832,7 +837,11 @@ SWITCH_DECLARE(switch_status_t) switch_cache_db_execute_sql_callback(switch_cach
break;
case SCDB_TYPE_CORE_DB:
{
status = switch_core_db_exec(dbh->native_handle.core_db_dbh, sql, callback, pdata, &errmsg);
int ret = switch_core_db_exec(dbh->native_handle.core_db_dbh, sql, callback, pdata, &errmsg);
if (ret == SWITCH_CORE_DB_OK || ret == SWITCH_CORE_DB_ABORT) {
status = SWITCH_STATUS_SUCCESS;
}
if (errmsg) {
dbh->last_used = switch_epoch_time_now(NULL) - (SQL_CACHE_TIMEOUT * 2);