[asterisk-commits] tilghman: branch 1.4 r188149 - /branches/1.4/res/res_odbc.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 13 18:04:20 CDT 2009


Author: tilghman
Date: Mon Apr 13 18:04:15 2009
New Revision: 188149

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=188149
Log:
If fileconfig limit exceeds our maximum, then set the limit to the maximum.
(Closes issue #14888)
Reported by: falves11

Modified:
    branches/1.4/res/res_odbc.c

Modified: branches/1.4/res/res_odbc.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.4/res/res_odbc.c?view=diff&rev=188149&r1=188148&r2=188149
==============================================================================
--- branches/1.4/res/res_odbc.c (original)
+++ branches/1.4/res/res_odbc.c Mon Apr 13 18:04:15 2009
@@ -252,9 +252,13 @@
 						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);




More information about the asterisk-commits mailing list