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

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Thu Oct 2 15:43:14 CDT 2008


Author: sruffell
Date: Thu Oct  2 15:43:14 2008
New Revision: 4553

URL: http://svn.digium.com/view/zaptel?view=rev&rev=4553
Log:
wctc4xxp_cleanup_channel_private needs a pointer to the zt_transcoder_channel
and not just the private portion now in order to manage the data ready flag
state.

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=4553&r1=4552&r2=4553
==============================================================================
--- branches/1.4/kernel/wctc4xxp/base.c (original)
+++ branches/1.4/kernel/wctc4xxp/base.c Thu Oct  2 15:43:14 2008
@@ -1433,9 +1433,11 @@
 }
 
 static void 
-wctc4xxp_cleanup_channel_private(struct wcdte *wc, struct channel_pvt *cpvt)
+wctc4xxp_cleanup_channel_private(struct wcdte *wc, 
+	struct zt_transcoder_channel *dtc)
 {
 	struct tcb *cmd, *temp;
+	struct channel_pvt *cpvt = dtc->pvt;
 	LIST_HEAD(local_list);
 
 	spin_lock_bh(&cpvt->lock);
@@ -1475,7 +1477,7 @@
 	compl_cpvt->chan_in_num = cpvt->chan_out_num;
 	compl_cpvt->chan_out_num = cpvt->chan_in_num;
 	zt_tc_set_built(compl_dtc);
-	wctc4xxp_cleanup_channel_private(wc, compl_cpvt);
+	wctc4xxp_cleanup_channel_private(wc, dtc);
 
 	return 0;
 }
@@ -1493,7 +1495,7 @@
 	DTE_DEBUG(DTE_DEBUG_CHANNEL_SETUP, 
 	          "Entering %s for channel %p.\n", __FUNCTION__, dtc);
 	/* Anything on the rx queue now is old news... */
-	wctc4xxp_cleanup_channel_private(wc, cpvt);
+	wctc4xxp_cleanup_channel_private(wc, dtc);
 	DTE_DEBUG(DTE_DEBUG_CHANNEL_SETUP, "Allocating a new channel: %p.\n", dtc);
 	wctc4xxp_srcfmt = wctc4xxp_zapfmt_to_dtefmt(dtc->srcfmt);
 	wctc4xxp_dstfmt = wctc4xxp_zapfmt_to_dtefmt(dtc->dstfmt);
@@ -1559,7 +1561,7 @@
 		return -EINTR;
 	}
 	/* Remove any packets that are waiting on the outbound queue. */
-	wctc4xxp_cleanup_channel_private(wc, cpvt);
+	wctc4xxp_cleanup_channel_private(wc, dtc);
 	index = cpvt->timeslot_in_num/2;
 	BUG_ON(index >= wc->numchannels);
 	if (ENCODER == cpvt->encoder) {
@@ -3133,16 +3135,13 @@
 {
 	int i;
 	struct zt_transcoder_channel *dtc_en, *dtc_de;
-	struct channel_pvt *cpvt;
 
 	for(i = 0; i < wc->numchannels; i++) {
 		dtc_en = &(wc->uencode->channels[i]);
-		cpvt = dtc_en->pvt;
-		wctc4xxp_cleanup_channel_private(wc, cpvt);
+		wctc4xxp_cleanup_channel_private(wc, dtc_en);
 		
 		dtc_de = &(wc->udecode->channels[i]);
-		cpvt = dtc_de->pvt;
-		wctc4xxp_cleanup_channel_private(wc, cpvt);
+		wctc4xxp_cleanup_channel_private(wc, dtc_de);
 	}
 }
 




More information about the zaptel-commits mailing list