[svn-commits] tzafrir: tools/trunk r5530 - /tools/trunk/dahdi_cfg.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Sun Dec 14 17:00:31 CST 2008
Author: tzafrir
Date: Sun Dec 14 17:00:31 2008
New Revision: 5530
URL: http://svn.digium.com/view/dahdi?view=rev&rev=5530
Log:
Allow the span timing to be up to 255.
The test for 15 was ineffective anyway. Some drivers can use higher
values. See issue #13954 .
Modified:
tools/trunk/dahdi_cfg.c
Modified: tools/trunk/dahdi_cfg.c
URL: http://svn.digium.com/view/dahdi/tools/trunk/dahdi_cfg.c?view=diff&rev=5530&r1=5529&r2=5530
==============================================================================
--- tools/trunk/dahdi_cfg.c (original)
+++ tools/trunk/dahdi_cfg.c Sun Dec 14 17:00:31 2008
@@ -47,6 +47,13 @@
#define NUM_SPANS DAHDI_MAX_SPANS
#define NUM_TONES 15
+
+/*! A sanity check for the timing parameter of the span.
+ *
+ * Note that each driver using it is still responsible for validating
+ * that value.
+ */
+#define MAX_TIMING 255
/* Assume no more than 1024 dynamics */
#define NUM_DYNAMIC 1024
@@ -314,8 +321,9 @@
return -1;
}
res = sscanf(realargs[1], "%i", &timing);
- if ((res != 1) || (timing < 0) || (timing > 15)) {
- error("Timing should be a number from 0 to 15, not '%s'\n", realargs[1]);
+ if ((res != 1) || (timing < 0) || (timing > MAX_TIMING)) {
+ error("Timing should be a number from 0 to %d, not '%s'\n",
+ MAX_TIMING, realargs[1]);
return -1;
}
res = sscanf(realargs[2], "%i", &lc[spans].lbo);
More information about the svn-commits
mailing list