res_config_odbc: Avoid deadlock when max_connections = 1
authorSean Bright <sean.bright@gmail.com>
Thu, 28 Feb 2019 01:09:03 +0000 (20:09 -0500)
committerSean Bright <sean.bright@gmail.com>
Thu, 28 Feb 2019 20:46:16 +0000 (14:46 -0600)
commit719a4643ab6d507381f347317e70ef7b9699a73e
treed8fe6f3c827e27e61182b1ff293d9f4512394e41
parent8f9ffe5905a0b34a13cba772262d06382a3991c6
res_config_odbc: Avoid deadlock when max_connections = 1

Rather than calling ast_odbc_find_table() in the prepare callback, call
it beforehand and pass it in to the callback to avoid the need for a
second connection.

ASTERISK-28166 #close

Change-Id: I6f8a0b9990d636fd6bc1a92ed70f7050d2436202
res/res_config_odbc.c