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

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Dec 4 14:57:28 CST 2008


Author: sruffell
Date: Thu Dec  4 14:57:28 2008
New Revision: 5434

URL: http://svn.digium.com/view/dahdi?view=rev&rev=5434
Log:
Fix an erroneous warning and ensure that the sample size is set correctly when
decoding G723 packets.
Issue: DAHDI-198

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=5434&r1=5433&r2=5434
==============================================================================
--- linux/trunk/drivers/dahdi/wctc4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctc4xxp/base.c Thu Dec  4 14:57:28 2008
@@ -1521,6 +1521,9 @@
 	/* Mark this channel as built */
 	dahdi_tc_set_built(dtc);
 	dtc->built_fmts = dtc->dstfmt | dtc->srcfmt;
+	DTE_DEBUG(DTE_DEBUG_CHANNEL_SETUP,
+	  "Channel %p has dstfmt=%x and srcfmt=%x\n", dtc, dtc->dstfmt,
+	  dtc->srcfmt);
 	/* Mark the channel complement (other half of encoder/decoder pair) as built */
 	res = wctc4xxp_mark_channel_complement_built(wc, dtc);
 	up(&wc->chansem);
@@ -1756,6 +1759,8 @@
 			return -EINVAL;
 		}
 		cpvt->timestamp = G723_SAMPLES;
+	} else if (DAHDI_FORMAT_G723_1 == dtc->dstfmt) {
+		cpvt->timestamp = G723_SAMPLES;
 	} else {
 		/* Same for ulaw and alaw */
 		cpvt->timestamp = G729_SAMPLES; 
@@ -1819,7 +1824,6 @@
 			list_del_init(&pos->node);
 			pos->flags &= ~(__WAIT_FOR_RESPONSE);
 			pos->response = cmd;
-			WARN_ON(pos->response);
 			WARN_ON(!(pos->flags & TX_COMPLETE));
 			complete(&pos->complete);
 			break;




More information about the svn-commits mailing list