Convert func_odbc to use the prepare_and_execute callback, which helps with a database reconnection issue (bug 7693)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40632 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2006-08-20 15:46:00 +00:00
parent 2dc0692e86
commit 6fec811743
2 changed files with 42 additions and 91 deletions

View File

@@ -120,6 +120,10 @@ SQLHSTMT odbc_prepare_and_execute(struct odbc_obj *obj, SQLHSTMT (*prepare_cb)(s
continue;
}
break;
} else {
ast_log(LOG_WARNING, "SQL Prepare failed. Attempting a reconnect...\n");
odbc_obj_disconnect(obj);
odbc_obj_connect(obj);
}
}