aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-04-13 23:04:15 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-04-13 23:04:15 +0000
commit07edcabcb5ee2788b5012892e2d73401ef78f29c (patch)
tree2e6352a0f193db1be5ec3ddaefbc89d63232024c /res
parent41333f8831fae6266cd77d58f6accd9d1f6b80fe (diff)
If fileconfig limit exceeds our maximum, then set the limit to the maximum.
(Closes issue #14888) Reported by: falves11 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@188149 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_odbc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/res/res_odbc.c b/res/res_odbc.c
index b0fed02c9..be174aab1 100644
--- a/res/res_odbc.c
+++ b/res/res_odbc.c
@@ -252,9 +252,13 @@ static int load_odbc_config(void)
ast_log(LOG_WARNING, "Limit should be a number, not a boolean: '%s'. Setting limit to 1023 for ODBC class '%s'.\n", v->value, cat);
limit = 1023;
} else if (ast_false(v->value)) {
- ast_log(LOG_WARNING, "Limit should be a number, not a boolean: '%s'. Disabling ODBC class '%s'.\n", v->value, cat);
- enabled = 0;
+ /* Limit=no probably means "no limit", which is the maximum */
+ ast_log(LOG_WARNING, "Limit should be a number, not a boolean: '%s'. Setting limit to 1023 for ODBC class '%s'.\n", v->value, cat);
+ limit = 1023;
break;
+ } else if (limit > 1023) {
+ ast_log(LOG_WARNING, "Maximum limit in 1.4 is 1023. Setting limit to 1023 for ODBC class '%s'.\n", cat);
+ limit = 1023;
}
} else if (!strcasecmp(v->name, "idlecheck")) {
sscanf(v->value, "%d", &idlecheck);