diff options
author | automerge <automerge@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-03-07 01:05:32 +0000 |
---|---|---|
committer | automerge <automerge@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-03-07 01:05:32 +0000 |
commit | e88a53402b5076b363b5cafe61f722f06da65b46 (patch) | |
tree | 870663f263652c8cb82e93a2fe096247d79b0e93 /manager.c | |
parent | 91a0561ef49cbe23479928fcd3eba85b8fda28a9 (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@58207 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'manager.c')
-rw-r--r-- | manager.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -885,8 +885,19 @@ 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"); + 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"); + ast_mutex_unlock(&chan->lock); + ast_mutex_unlock(&chan2->lock); + return 0; + } res = ast_async_goto(chan, context, exten, pi); if (!res) { if (!ast_strlen_zero(name2)) { |