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:
Tilghman Lesher
2006-11-13 05:45:11 +00:00
parent ec623148c0
commit a99b6a1c97

View File

@@ -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;