[asterisk-commits] russell: branch 1.2 r58167 - /branches/1.2/manager.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Mar 6 17:27:04 MST 2007


Author: russell
Date: Tue Mar  6 18:27:04 2007
New Revision: 58167

URL: http://svn.digium.com/view/asterisk?view=rev&rev=58167
Log:
Fix a misplaced block of code in the 1.2 version of the patch to fix issue #8977

Modified:
    branches/1.2/manager.c

Modified: branches/1.2/manager.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/manager.c?view=diff&rev=58167&r1=58166&r2=58167
==============================================================================
--- branches/1.2/manager.c (original)
+++ branches/1.2/manager.c Tue Mar  6 18:27:04 2007
@@ -879,15 +879,15 @@
 		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))



More information about the asterisk-commits mailing list