[Asterisk-code-review] chan local: Fix hangupcauses not getting set on Local/ channels (asterisk[11])

Jaco Kroon asteriskteam at digium.com
Mon Apr 11 14:19:20 CDT 2016


Jaco Kroon has uploaded a new change for review.

  https://gerrit.asterisk.org/2568

Change subject: chan_local: Fix hangupcauses not getting set on Local/ channels
......................................................................

chan_local: Fix hangupcauses not getting set on Local/ channels

ASTERISK-25912 #close

Change-Id: I9ec0d40bd0e8ff16ba9c3cfc4c1b52cc575f421b
---
M channels/chan_local.c
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/68/2568/1

diff --git a/channels/chan_local.c b/channels/chan_local.c
index 562c181..423ca4c 100644
--- a/channels/chan_local.c
+++ b/channels/chan_local.c
@@ -785,6 +785,13 @@
 			ast_debug(4, "Blocked indication %d\n", condition);
 		}
 		ao2_unlock(p);
+
+		/*
+		 * we need to return -1 here so that asterisk core will correctly set up hangupcauses.
+		 */
+		if (condition == AST_CONTROL_PVT_CAUSE_CODE) {
+			res = -1;
+		}
 	}
 
 	ao2_ref(p, -1);

-- 
To view, visit https://gerrit.asterisk.org/2568
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ec0d40bd0e8ff16ba9c3cfc4c1b52cc575f421b
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Jaco Kroon <jaco at uls.co.za>



More information about the asterisk-code-review mailing list