summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsruffell <sruffell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-10-02 20:43:14 +0000
committersruffell <sruffell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-10-02 20:43:14 +0000
commitfb65d9c40ff5b61761f26651c8d790c8889d66fc (patch)
tree4b2640f19a25e5947a76600c1567b012474da5be
parent29de7a2faa449d5e09a29facd5cf2d77d2607619 (diff)
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. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4553 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r--kernel/wctc4xxp/base.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/kernel/wctc4xxp/base.c b/kernel/wctc4xxp/base.c
index 7476bd9..6751424 100644
--- a/kernel/wctc4xxp/base.c
+++ b/kernel/wctc4xxp/base.c
@@ -1433,9 +1433,11 @@ wctc4xxp_getctl(struct wcdte *wc, unsigned int addr)
}
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 @@ wctc4xxp_mark_channel_complement_built(struct wcdte *wc,
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 @@ do_channel_allocate(struct zt_transcoder_channel *dtc)
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 @@ wctc4xxp_operation_release(struct zt_transcoder_channel *dtc)
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 @@ static void wctc4xxp_cleanup_channels(struct wcdte *wc)
{
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);
}
}