aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_odbc.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-01 18:08:44 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-01 18:08:44 +0000
commite2d7ac6e3fa527b2d40d7804612487dc46558e9c (patch)
tree2ccb475482ad86dff2adf1b72f138f101287f9a0 /res/res_odbc.c
parentdadc6549d2812a91a7d561e9fb0995824c802a99 (diff)
Clarify the pooling functionality by changing the config file keyword
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@101824 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_odbc.c')
-rw-r--r--res/res_odbc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/res/res_odbc.c b/res/res_odbc.c
index 201cf77b9..34d905b55 100644
--- a/res/res_odbc.c
+++ b/res/res_odbc.c
@@ -262,6 +262,10 @@ static int load_odbc_config(void)
if (!strcasecmp(v->name, "pooling")) {
if (ast_true(v->value))
pooling = 1;
+ } else if (!strncasecmp(v->name, "share", 5)) {
+ /* "shareconnections" is a little clearer in meaning than "pooling" */
+ if (ast_false(v->value))
+ pooling = 1;
} else if (!strcasecmp(v->name, "limit")) {
sscanf(v->value, "%d", &limit);
if (ast_true(v->value) && !limit) {
@@ -633,7 +637,12 @@ static int reload(void)
bse = 1;
for (v = ast_variable_browse(config, cat); v; v = v->next) {
if (!strcasecmp(v->name, "pooling")) {
- pooling = 1;
+ if (ast_true(v->value))
+ pooling = 1;
+ } else if (!strncasecmp(v->name, "share", 5)) {
+ /* "shareconnections" is a little clearer in meaning than "pooling" */
+ if (ast_false(v->value))
+ pooling = 1;
} else if (!strcasecmp(v->name, "limit")) {
sscanf(v->value, "%d", &limit);
if (ast_true(v->value) && !limit) {