mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 03:50:31 +00:00
If the execute fails a second time, make sure that we don't pass back a stale handle
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -140,6 +140,7 @@ SQLHSTMT odbc_prepare_and_execute(odbc_obj *obj, SQLHSTMT (*prepare_cb)(odbc_obj
|
||||
|
||||
ast_log(LOG_WARNING, "SQL Execute error %d! Attempting a reconnect...\n", res);
|
||||
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
|
||||
stmt = NULL;
|
||||
|
||||
ast_mutex_lock(&obj->lock);
|
||||
obj->up = 0;
|
||||
|
Reference in New Issue
Block a user