[asterisk-commits] rmudgett: trunk r354837 - in /trunk: ./ main/manager.c

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


Author: rmudgett
Date: Fri Feb 10 12:08:19 2012
New Revision: 354837

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=354837
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)
........

Merged revisions 354835 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 354836 from http://svn.asterisk.org/svn/asterisk/branches/10

Modified:
    trunk/   (props changed)
    trunk/main/manager.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Modified: trunk/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/manager.c?view=diff&rev=354837&r1=354836&r2=354837
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Fri Feb 10 12:08:19 2012
@@ -3515,7 +3515,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);
@@ -3535,10 +3535,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