]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
If fileconfig limit exceeds our maximum, then set the limit to the maximum.
authorTilghman Lesher <tilghman@meg.abyt.es>
Mon, 13 Apr 2009 23:04:15 +0000 (23:04 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Mon, 13 Apr 2009 23:04:15 +0000 (23:04 +0000)
(Closes issue #14888)
Reported by: falves11

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@188149 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_odbc.c

index b0fed02c99218fd3d4b4395e3e37007c59db7ed3..be174aab1ba62e033aca9e642502eee02e666bc3 100644 (file)
@@ -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);