From a99b6a1c976dfc422670faedb78e24804425a1c7 Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Mon, 13 Nov 2006 05:45:11 +0000 Subject: [PATCH] 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 --- res/res_odbc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/res/res_odbc.c b/res/res_odbc.c index cc4b61f2d9..92cd1ccfbb 100644 --- a/res/res_odbc.c +++ b/res/res_odbc.c @@ -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; -- 2.47.2