diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-03-07 00:27:04 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-03-07 00:27:04 +0000 |
commit | 142decb5393274865024e886095d806ea7715fae (patch) | |
tree | 91f068926bc9632891670647785a3016429a5140 /manager.c | |
parent | 8fc37c8f0d7bfb06b28b7907b6a54f85ce688989 (diff) |
Fix a misplaced block of code in the 1.2 version of the patch to fix issue #8977
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@58167 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'manager.c')
-rw-r--r-- | manager.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -879,17 +879,17 @@ static int action_redirect(struct mansession *s, struct message *m) return 0; } chan = ast_get_channel_by_name_locked(name); - 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 (!chan) { char buf[BUFSIZ]; snprintf(buf, sizeof(buf), "Channel does not exist: %s", name); 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) { |