[zaptel-commits] sruffell: branch 1.4 r4492 - /branches/1.4/kernel/wctc4xxp/base.c

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Tue Aug 19 15:24:53 CDT 2008


Author: sruffell
Date: Tue Aug 19 15:24:52 2008
New Revision: 4492

URL: http://svn.digium.com/view/zaptel?view=rev&rev=4492
Log:
Fix bug where all transcoders are named tc400b0.


Modified:
    branches/1.4/kernel/wctc4xxp/base.c

Modified: branches/1.4/kernel/wctc4xxp/base.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/kernel/wctc4xxp/base.c?view=diff&rev=4492&r1=4491&r2=4492
==============================================================================
--- branches/1.4/kernel/wctc4xxp/base.c (original)
+++ branches/1.4/kernel/wctc4xxp/base.c Tue Aug 19 15:24:52 2008
@@ -1744,6 +1744,10 @@
 			   "%d bytes.\n", count, G723_5K_BYTES);
 			return -EINVAL;
 		}
+		cpvt->timestamp += G723_SAMPLES;
+	} else {
+		/* Same for ulaw and alaw */
+		cpvt->timestamp += G729_SAMPLES;
 	}
 
 	if (!(cmd = wctc4xxp_create_rtp_cmd(wc, dtc, count))) {
@@ -1756,7 +1760,6 @@
 		return -EFAULT;
 	}
 	cpvt->seqno += 1;
-	cpvt->timestamp += count;
 
 	DTE_DEBUG(DTE_DEBUG_RTP_TX, 
 	    "Sending packet of %Zu byte on channel (%p).\n", count, dtc);
@@ -2867,12 +2870,15 @@
 	list_for_each_entry(cur, &wctc4xxp_list, node) {
 		if (cur->pos != pos) {
 			/* Add the new entry before the one here */
-			list_add_tail(&wc->node, &wctc4xxp_list);
+			list_add_tail(&wc->node, &cur->node);
 			break;
 		}
 		else {
 			++pos;
 		}
+	}
+	if (list_empty(&wc->node)) {
+		list_add_tail(&wc->node, &wctc4xxp_list);
 	}
 	spin_unlock(&wctc4xxp_list_lock);
 	return pos;
@@ -3237,13 +3243,6 @@
 int __init wctc4xxp_init(void)
 {
 	int res;
-#	ifndef CONFIG_WCDTE_NETWORK_IF
-	if (debug & (DTE_DEBUG_NETWORK_IF|DTE_DEBUG_NETWORK_EARLY)) {
-		printk(KERN_WARNING "%s: The Network interface was not compiled into the driver.\n", THIS_MODULE->name);
-		debug &= ~(DTE_DEBUG_NETWORK_IF|DTE_DEBUG_NETWORK_EARLY);
-	}
-#	endif
-
 #	if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
 	cmd_cache = kmem_cache_create(THIS_MODULE->name, sizeof(struct tcb), 0, 
 	                              SLAB_HWCACHE_ALIGN, NULL, NULL);




More information about the zaptel-commits mailing list