[asterisk-commits] rmudgett: branch 1.8 r354835 - /branches/1.8/main/manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Feb 10 12:03:32 CST 2012


Author: rmudgett
Date: Fri Feb 10 12:03:30 2012
New Revision: 354835

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=354835
Log:
Fix AMI Redirect ExtraChannel not redirecting to the same exten and context.

The astman_get_header() never returns NULL so the check by the code for
NULL would never fail.

(closes issue ASTERISK-16974)
Reported by: Nuno Borges
Patches:
      0018325.patch (license #6116) patch uploaded by Nuno Borges (modified)

Modified:
    branches/1.8/main/manager.c

Modified: branches/1.8/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/manager.c?view=diff&rev=354835&r1=354834&r2=354835
==============================================================================
--- branches/1.8/main/manager.c (original)
+++ branches/1.8/main/manager.c Fri Feb 10 12:03:30 2012
@@ -3472,7 +3472,7 @@
 					ast_set_flag(chan2, AST_FLAG_BRIDGE_HANGUP_DONT); /* don't let the after-bridge code run the h-exten */
 					ast_channel_unlock(chan2);
 				}
-				if (context2) {
+				if (!ast_strlen_zero(context2)) {
 					res = ast_async_goto(chan2, context2, exten2, pi2);
 				} else {
 					res = ast_async_goto(chan2, context, exten, pi);
@@ -3492,10 +3492,7 @@
 		astman_send_error(s, m, "Redirect failed");
 	}
 
-	if (chan) {
-		chan = ast_channel_unref(chan);
-	}
-
+	chan = ast_channel_unref(chan);
 	if (chan2) {
 		chan2 = ast_channel_unref(chan2);
 	}




More information about the asterisk-commits mailing list