Revert "chan_dahdi: set CHANNEL(hangupsource) when a PRI channel hangs up"

There are reports that this commit causes deadlocks when issuing
a "pri show" CLI command and a channel is in the process of being
hung up.  Further work is in progress to determine the cause of
the deadlock and provide a permanent fix.

ASTERISK~28605  #keeping open
Reported by: Dirk Wendland

This reverts commit c6b17b5212.

Change-Id: Iddd900c1abdd5074ff39c17cdce855f2f436cef9
changes/56/13456/1
George Joseph 7 years ago
parent 7a73da2bf9
commit a76d3103fb

@ -1391,25 +1391,14 @@ static void pri_queue_control(struct sig_pri_span *pri, int chanpos, int subclas
*/
static void sig_pri_queue_hangup(struct sig_pri_span *pri, int chanpos)
{
struct ast_channel *owner;
if (sig_pri_callbacks.queue_control) {
sig_pri_callbacks.queue_control(pri->pvts[chanpos]->chan_pvt, AST_CONTROL_HANGUP);
}
sig_pri_lock_owner(pri, chanpos);
owner = pri->pvts[chanpos]->owner;
if (owner) {
ao2_ref(owner, +1);
ast_queue_hangup(owner);
ast_channel_unlock(owner);
/* Tell the CDR this DAHDI channel hung up */
sig_pri_unlock_private(pri->pvts[chanpos]);
ast_set_hangupsource(owner, ast_channel_name(owner), 0);
sig_pri_lock_private(pri->pvts[chanpos]);
ao2_ref(owner, -1);
if (pri->pvts[chanpos]->owner) {
ast_queue_hangup(pri->pvts[chanpos]->owner);
ast_channel_unlock(pri->pvts[chanpos]->owner);
}
}

Loading…
Cancel
Save