diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-13 05:45:11 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-13 05:45:11 +0000 |
commit | 830dd3c78910a09fc0e7fa2ffb5a5c77b7ab8b02 (patch) | |
tree | 5f6c0428ae56e6c814ca570c7bd298f7d19f412c /res | |
parent | dbf1009d7e2bfcbbae98746a2377d8d6b8ca1c26 (diff) |
If the execute fails a second time, make sure that we don't pass back a stale handle
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@47525 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_odbc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/res/res_odbc.c b/res/res_odbc.c index cc4b61f2d..92cd1ccfb 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; |