]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
If the execute fails a second time, make sure that we don't pass back a stale handle
authorTilghman Lesher <tilghman@meg.abyt.es>
Mon, 13 Nov 2006 05:45:11 +0000 (05:45 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Mon, 13 Nov 2006 05:45:11 +0000 (05:45 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47525 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_odbc.c

index cc4b61f2d946757b8e65694b4fb0257551b713a3..92cd1ccfbb4d1cbf9ac0353368ea4034de602ec2 100644 (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;