[dahdi-commits] sruffell: linux/trunk r4798 - /linux/trunk/drivers/dahdi/wctc4xxp/base.c

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Wed Aug 20 14:31:46 CDT 2008


Author: sruffell
Date: Wed Aug 20 14:31:45 2008
New Revision: 4798

URL: http://svn.digium.com/view/dahdi?view=rev&rev=4798
Log:
Change to support both 5.3kbps and 6.3kbps bit rates when using the G723.1
codec.

Modified:
    linux/trunk/drivers/dahdi/wctc4xxp/base.c

Modified: linux/trunk/drivers/dahdi/wctc4xxp/base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctc4xxp/base.c?view=diff&rev=4798&r1=4797&r2=4798
==============================================================================
--- linux/trunk/drivers/dahdi/wctc4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctc4xxp/base.c Wed Aug 20 14:31:45 2008
@@ -1677,13 +1677,13 @@
 		cpvt->last_dte_seqno = be16_to_cpu(packet->rtphdr.seqno);
 	} else {
 		rtp_eseq = ++cpvt->last_dte_seqno;
-		if ( packet->rtphdr.seqno != rtp_eseq )
+		if ( be16_to_cpu(packet->rtphdr.seqno) != rtp_eseq )
 			DTE_DEBUG(DTE_DEBUG_GENERAL,
 			 "Bad seqno from DTE! [%04X][%d][%d][%d]\n", 
 			 be16_to_cpu(packet->rtphdr.seqno), 
 			 (be16_to_cpu(packet->udphdr.dest) - 0x5000),
 			 be16_to_cpu(packet->rtphdr.seqno), 
-			 cpvt->last_dte_seqno);
+			 rtp_eseq);
 
 		cpvt->last_dte_seqno = be16_to_cpu(packet->rtphdr.seqno);
 	}
@@ -1736,11 +1736,11 @@
 	}
 
 	if (DAHDI_FORMAT_G723_1 == dtc->srcfmt) {
-		if (G723_5K_BYTES != count) {
+		if ((G723_5K_BYTES != count) && (G723_6K_BYTES != count)) {
 			DTE_DEBUG(DTE_DEBUG_GENERAL, 
 			   "Trying to transcode packet into G723 format " \
 			   "that is %Zu bytes instead of the expected " \
-			   "%d bytes.\n", count, G723_5K_BYTES);
+			   "%d/%d bytes.\n", count, G723_5K_BYTES, G723_6K_BYTES);
 			return -EINVAL;
 		}
 		cpvt->timestamp = G723_SAMPLES;




More information about the dahdi-commits mailing list