[Asterisk-code-review] channel: Queue hangup if channel is hung up during connected... (asterisk[certified/13.1])
Joshua Colp
asteriskteam at digium.com
Wed Jan 13 06:00:18 CST 2016
Joshua Colp has uploaded a new change for review.
https://gerrit.asterisk.org/1998
Change subject: channel: Queue hangup if channel is hung up during connected line sub.
......................................................................
channel: Queue hangup if channel is hung up during connected line sub.
When connected or redirected subroutines or macros are executed it is
expected that the underlying applications and logic invoked are fast
and do not consume frames. In practice this constraint is not enforced
and if not adhered to will cause channels to continue when they shouldn't.
This is because each caller of the connected or redirected logic does not
check whether the channel has been hung up on return. As a result the
the hung up channel continues.
This change makes it so when a connected or redirected subroutine or
macro is finished the channel is checked. If the channel has been hung
up a hangup is queued again so the caller will see this and stop.
ASTERISK-25690 #close
Change-Id: I1f9a8ceb1487df0389f0d346ce0f6dcbcaf476ea
---
M main/channel.c
1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/98/1998/1
diff --git a/main/channel.c b/main/channel.c
index 6e5132f..bfc408b 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -9983,6 +9983,10 @@
ast_party_connected_line_free(&saved_connected);
}
+ if (ast_check_hangup_locked(macro_chan)) {
+ ast_queue_hangup(macro_chan);
+ }
+
return retval;
}
@@ -10033,6 +10037,10 @@
ast_party_redirecting_free(&saved_redirecting);
}
+ if (ast_check_hangup_locked(macro_chan)) {
+ ast_queue_hangup(macro_chan);
+ }
+
return retval;
}
@@ -10076,6 +10084,10 @@
ast_party_connected_line_free(&saved_connected);
}
+ if (ast_check_hangup_locked(sub_chan)) {
+ ast_queue_hangup(sub_chan);
+ }
+
return retval;
}
@@ -10119,6 +10131,10 @@
ast_party_redirecting_free(&saved_redirecting);
}
+ if (ast_check_hangup_locked(sub_chan)) {
+ ast_queue_hangup(sub_chan);
+ }
+
return retval;
}
--
To view, visit https://gerrit.asterisk.org/1998
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f9a8ceb1487df0389f0d346ce0f6dcbcaf476ea
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: certified/13.1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
More information about the asterisk-code-review
mailing list