diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2008-12-14 23:00:31 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2008-12-14 23:00:31 +0000 |
commit | 8cfb27562ee11edfb610d9bc9daf3f913a10c435 (patch) | |
tree | 7d59206598ded18d18016b8f97bed41dab0fd790 /dahdi_cfg.c | |
parent | 52a1d4a40835af3310ed2996641053df5e6a0ec5 (diff) |
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 .
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@5530 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'dahdi_cfg.c')
-rw-r--r-- | dahdi_cfg.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/dahdi_cfg.c b/dahdi_cfg.c index 4d85e27..27d39ad 100644 --- a/dahdi_cfg.c +++ b/dahdi_cfg.c @@ -48,6 +48,13 @@ #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 @@ int spanconfig(char *keyword, char *args) 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); |