[zaptel-commits] tzafrir: branch 1.2 r4587 - /branches/1.2/

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Tue Nov 25 14:59:19 CST 2008


Author: tzafrir
Date: Tue Nov 25 14:59:19 2008
New Revision: 4587

URL: http://svn.digium.com/view/zaptel?view=rev&rev=4587
Log:
Fixing issue #13954 in zaptel 1.2.

Modified:
    branches/1.2/tor2.c
    branches/1.2/torisa.c
    branches/1.2/wct1xxp.c
    branches/1.2/wcte11xp.c

Modified: branches/1.2/tor2.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/tor2.c?view=diff&rev=4587&r1=4586&r2=4587
==============================================================================
--- branches/1.2/tor2.c (original)
+++ branches/1.2/tor2.c Tue Nov 25 14:59:19 2008
@@ -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;

Modified: branches/1.2/torisa.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/torisa.c?view=diff&rev=4587&r1=4586&r2=4587
==============================================================================
--- branches/1.2/torisa.c (original)
+++ branches/1.2/torisa.c Tue Nov 25 14:59:19 2008
@@ -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;

Modified: branches/1.2/wct1xxp.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wct1xxp.c?view=diff&rev=4587&r1=4586&r2=4587
==============================================================================
--- branches/1.2/wct1xxp.c (original)
+++ branches/1.2/wct1xxp.c Tue Nov 25 14:59:19 2008
@@ -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);

Modified: branches/1.2/wcte11xp.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wcte11xp.c?view=diff&rev=4587&r1=4586&r2=4587
==============================================================================
--- branches/1.2/wcte11xp.c (original)
+++ branches/1.2/wcte11xp.c Tue Nov 25 14:59:19 2008
@@ -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);




More information about the zaptel-commits mailing list