Merged revisions 47526 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Mon, 13 Nov 2006 05:48:27 +0000 (05:48 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Mon, 13 Nov 2006 05:48:27 +0000 (05:48 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r47526 | tilghman | 2006-11-12 23:46:18 -0600 (Sun, 12 Nov 2006) | 10 lines

Merged revisions 47525 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r47525 | tilghman | 2006-11-12 23:45:11 -0600 (Sun, 12 Nov 2006) | 2 lines

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/trunk@47528 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_odbc.c

index 036b021..e871900 100644 (file)
@@ -108,6 +108,7 @@ SQLHSTMT ast_odbc_prepare_and_execute(struct odbc_obj *obj, SQLHSTMT (*prepare_c
 
                                ast_log(LOG_WARNING, "SQL Execute error %d! Attempting a reconnect...\n", res);
                                SQLFreeHandle(SQL_HANDLE_STMT, stmt);
+                               stmt = NULL;
 
                                obj->up = 0;
                                /*