From: Automerge Script Date: Wed, 4 Apr 2007 17:53:11 +0000 (+0000) Subject: automerge commit X-Git-Tag: 1.2.18-netsec~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aca1adfe03068cda467354a8bacbfab2d38d95e8;p=thirdparty%2Fasterisk.git automerge commit git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@60166 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/manager.c b/manager.c index 30210a2f5f..e83c55e20c 100644 --- a/manager.c +++ b/manager.c @@ -885,15 +885,15 @@ static int action_redirect(struct mansession *s, struct message *m) astman_send_error(s, m, buf); return 0; } - if (chan->_state != AST_STATE_UP) { - astman_send_error(s, m, "Redirect failed, channel not up.\n"); + if (ast_check_hangup(chan)) { + astman_send_error(s, m, "Redirect failed, channel hung up.\n"); ast_mutex_unlock(&chan->lock); return 0; } if (!ast_strlen_zero(name2)) chan2 = ast_get_channel_by_name_locked(name2); - if (chan2 && chan2->_state != AST_STATE_UP) { - astman_send_error(s, m, "Redirect failed, extra channel not up.\n"); + if (chan2 && ast_check_hangup(chan2)) { + astman_send_error(s, m, "Redirect failed, extra channel hung up.\n"); ast_mutex_unlock(&chan->lock); ast_mutex_unlock(&chan2->lock); return 0;