aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-04-04 17:41:37 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-04-04 17:41:37 +0000
commit05fda0428ceb40e1c0e6ce9fef6742310e98a05f (patch)
treedd16c46e5ea10d813973c7af7e13e95f6720932c /main
parent1824c632b249897435c7a5afc5524849bbe771ad (diff)
Merged revisions 60137 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r60137 | russell | 2007-04-04 12:40:10 -0500 (Wed, 04 Apr 2007) | 14 lines Merged revisions 60134 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r60134 | russell | 2007-04-04 12:38:47 -0500 (Wed, 04 Apr 2007) | 6 lines It is valid to redirect channels via the manager interface that are not in the UP state. Instead of checking for that to prevent to ensure a dead channel doesn't get redirected, just use the ast_check_hangup() API call. (issue #9457, reported by Callmewind, patch by me) (related to issue #8977) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@60141 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/manager.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/manager.c b/main/manager.c
index bb3c6471c..116b77a37 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -1682,14 +1682,14 @@ static int action_redirect(struct mansession *s, const struct message *m)
astman_send_error(s, m, buf);
return 0;
}
- if (chan->_state != AST_STATE_UP) {
+ if (ast_check_hangup(chan)) {
astman_send_error(s, m, "Redirect failed, channel not up.\n");
ast_channel_unlock(chan);
return 0;
}
if (!ast_strlen_zero(name2))
chan2 = ast_get_channel_by_name_locked(name2);
- if (chan2 && chan2->_state != AST_STATE_UP) {
+ if (chan2 && ast_check_hangup(chan2)) {
astman_send_error(s, m, "Redirect failed, extra channel not up.\n");
ast_channel_unlock(chan);
ast_channel_unlock(chan2);