]> git.ipfire.org Git - thirdparty/asterisk.git/commit
func_odbc: Check connection status before executing queries. 16/2716/1
authorMark Michelson <mmichelson@digium.com>
Wed, 27 Apr 2016 18:23:37 +0000 (13:23 -0500)
committerMark Michelson <mmichelson@digium.com>
Wed, 27 Apr 2016 18:33:40 +0000 (13:33 -0500)
commit2b150f0b8095f0297e3cf49e6428267e03299afb
treee908967e8ac97155a319674e8caa1e5283987e2e
parentd1b9b96456b10fdd3e9b69e24f8bad8b847578e2
func_odbc: Check connection status before executing queries.

A recent change to func_odbc made it so that a single connection was
maintained per DSN. The problem was that the code was optimistic about
the health of the connection after initially opening it and did nothing
to re-connect in case the connection had died.

This change adds a check before executing a query to ensure that the
connection to the database is still up and running.

ASTERISK-25963 #close
Reported by Ross Beer

Change-Id: Id33c86eb04ff48ca088bb2e3086c27b3b683491d
funcs/func_odbc.c