]> git.ipfire.org Git - thirdparty/asterisk.git/commit
func_odbc: Check connection status before executing queries. 15/2715/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:23:37 +0000 (13:23 -0500)
commit677d5b515151b51ed8be5e760ce0c7b99dae2761
treef0fd24982471621f2012107e652da2ba62ba045b
parente5c5fac8f1a2990103971e950be2593584ee60c2
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