svn diff -c 4587 http://svn.digium.com/svn/zaptel/branches/1.2/ see https://issues.asterisk.org/view.php?id=13954 Index: wcte11xp.c =================================================================== --- wcte11xp.c (revision 4586) +++ wcte11xp.c (revision 4587) @@ -932,7 +932,7 @@ span->txlevel = lc->lbo; span->rxlevel = 0; /* Do we want to SYNC on receive or not */ - wc->sync = lc->sync; + wc->sync = (lc->sync) ? 1 : 0; /* If already running, apply changes immediately */ if (span->flags & ZT_FLAG_RUNNING) return t1xxp_startup(span); Index: tor2.c =================================================================== --- tor2.c (revision 4586) +++ tor2.c (revision 4587) @@ -203,6 +203,13 @@ if (debug) printk("Tor2: Configuring span %d\n", span->spanno); + + if ((lc->sync < 0) || (lc->sync >= SPANS_PER_CARD)) { + printk(KERN_WARNING "%s %d: invalid span timing value %d.\n", + THIS_MODULE->name, span->spanno, lc->sync); + return -EINVAL; + } + /* XXX We assume lineconfig is okay and shouldn't XXX */ span->lineconfig = lc->lineconfig; span->txlevel = lc->lbo; Index: torisa.c =================================================================== --- torisa.c (revision 4586) +++ torisa.c (revision 4587) @@ -602,6 +602,13 @@ { if (debug) printk("TorISA: Configuring span %d\n", span->spanno); + + if ((lc->sync < 0) || (lc->sync >= 2)) { + printk(KERN_WARNING "%s %d: invalid span timing value %d.\n", + THIS_MODULE->name, span->spanno, lc->sync); + return -EINVAL; + } + /* XXX We assume lineconfig is okay and shouldn't XXX */ span->lineconfig = lc->lineconfig; span->txlevel = lc->lbo; Index: wct1xxp.c =================================================================== --- wct1xxp.c (revision 4586) +++ wct1xxp.c (revision 4587) @@ -738,7 +738,7 @@ span->txlevel = lc->lbo; span->rxlevel = 0; /* Do we want to SYNC on receive or not */ - wc->sync = lc->sync; + wc->sync = (lc->sync) ? 1 : 0; /* If already running, apply changes immediately */ if (span->flags & ZT_FLAG_RUNNING) return t1xxp_startup(span);