]> git.ipfire.org Git - thirdparty/asterisk.git/commit
func_odbc: Fix connection deadlock. 74/3174/1
authorJoshua Colp <jcolp@digium.com>
Mon, 11 Jul 2016 00:08:28 +0000 (21:08 -0300)
committerJoshua Colp <jcolp@digium.com>
Tue, 12 Jul 2016 10:00:16 +0000 (05:00 -0500)
commit4ad333bb0e365b8a2795756225794c9d0b09e05c
treebf6ee35422453a71d469bc803271331aef711b64
parent44f16af7cc9a6bc5203106a81b595997cb31c4fd
func_odbc: Fix connection deadlock.

The func_odbc module was modified to ensure that the
previous behavior of using a single database connection
was maintained. This was done by getting a single database
connection and holding on to it. With the new multiple
connection support in res_odbc this will actually starve
every other thread from getting access to the database as
it also maintains the previous behavior of having only
a single database connection.

This change disables the func_odbc specific behavior if
the res_odbc module is running with only a single database
connection active. The connection is only kept for the
duration of the request.

ASTERISK-26177 #close

Change-Id: I9bdbd8a300fb3233877735ad3fd07bce38115b7f
funcs/func_odbc.c
include/asterisk/res_odbc.h
res/res_odbc.c