[Asterisk-code-review] Revert "chan_dahdi: set CHANNEL(hangupsource) when a PRI channel hang... (asterisk[16.7])

George Joseph asteriskteam at digium.com
Wed Dec 18 08:41:15 CST 2019


George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/13455 )


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

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 c6b17b521231dde9da890d95ee705c93953bab8c.

Change-Id: Iddd900c1abdd5074ff39c17cdce855f2f436cef9
---
M channels/sig_pri.c
1 file changed, 3 insertions(+), 14 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/55/13455/1

diff --git a/channels/sig_pri.c b/channels/sig_pri.c
index 2cf0df2..f7a1845 100644
--- a/channels/sig_pri.c
+++ b/channels/sig_pri.c
@@ -1391,25 +1391,14 @@
  */
 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);
 	}
 }
 

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13455
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16.7
Gerrit-Change-Id: Iddd900c1abdd5074ff39c17cdce855f2f436cef9
Gerrit-Change-Number: 13455
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191218/bf4fbcdf/attachment.html>


More information about the asterisk-code-review mailing list