summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-07-10 21:08:28 -0300
committerJoshua Colp <jcolp@digium.com>2016-07-10 21:42:02 -0300
commit17efed6cf77d936c8e007c5d6afcd37acdc5b880 (patch)
treec01fed17bb2005cba076cf2a76cc7c28130312b4 /include
parent8019f321290818de8be4772c8b6afaa6e9b312b2 (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/res_odbc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asterisk/res_odbc.h b/include/asterisk/res_odbc.h
index 8c7b54950..137f7d4a5 100644
--- a/include/asterisk/res_odbc.h
+++ b/include/asterisk/res_odbc.h
@@ -243,4 +243,9 @@ int ast_odbc_text2isolation(const char *txt);
*/
const char *ast_odbc_isolation2text(int iso);
+/*!
+ * \brief Return the current configured maximum number of connections for a class
+ */
+unsigned int ast_odbc_get_max_connections(const char *name);
+
#endif /* _ASTERISK_RES_ODBC_H */