[asterisk-commits] rmudgett: trunk r369261 - /trunk/apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jun 22 16:51:09 CDT 2012


Author: rmudgett
Date: Fri Jun 22 16:51:05 2012
New Revision: 369261

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=369261
Log:
Fix F and F(x) action logic in Queue application.

Modified:
    trunk/apps/app_queue.c

Modified: trunk/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_queue.c?view=diff&rev=369261&r1=369260&r2=369261
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Fri Jun 22 16:51:05 2012
@@ -5474,20 +5474,17 @@
 		}
 
 		if (!ast_check_hangup(peer) && ast_test_flag(&opts, OPT_CALLEE_GO_ON)) {
+			int goto_res;
+
 			if (!ast_strlen_zero(opt_args[OPT_ARG_CALLEE_GO_ON])) {
 				ast_replace_subargument_delimiter(opt_args[OPT_ARG_CALLEE_GO_ON]);
-
-				if (ast_parseable_goto(peer, opt_args[OPT_ARG_CALLEE_GO_ON]) == AST_PBX_SUCCESS) {
-					ast_pbx_start(peer);
-				} else {
-					ast_hangup(peer);
-				}
+				goto_res = ast_parseable_goto(peer, opt_args[OPT_ARG_CALLEE_GO_ON]);
 			} else { /* F() */
-				if (ast_goto_if_exists(peer, caller_context, caller_extension, caller_priority + 1) == AST_PBX_GOTO_FAILED) {
-					ast_hangup(peer);
-				} else {
-					ast_pbx_start(peer);
-				}
+				goto_res = ast_goto_if_exists(peer, caller_context, caller_extension,
+					caller_priority + 1);
+			}
+			if (goto_res || ast_pbx_start(peer)) {
+				ast_hangup(peer);
 			}
 		} else {
 			ast_hangup(peer);




More information about the asterisk-commits mailing list