[svn-commits] mmichelson: trunk r166861 - in /trunk/apps: app_dial.c app_queue.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Dec 29 12:04:53 CST 2008


Author: mmichelson
Date: Mon Dec 29 12:04:52 2008
New Revision: 166861

URL: http://svn.digium.com/view/asterisk?view=rev&rev=166861
Log:
Update app_queue to deal with the removal of AST_PBX_KEEPALIVE

When placing a call to a queue which ran a gosub on the member's
channel, Asterisk would crash every time, stemming from the fact
that the member's channel was being hung up unexpectedly when the
Gosub completed. The necessary change was pretty much copied and
pasted from app_dial's similar changes made last week.

I also took the opportunity to change a LOG_DEBUG message in
app_dial to use ast_debug. I am guessing this was due to a direct
merge from 1.4 that was not corrected to use trunk's preferred
syntax.


Modified:
    trunk/apps/app_dial.c
    trunk/apps/app_queue.c

Modified: trunk/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dial.c?view=diff&rev=166861&r1=166860&r2=166861
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Mon Dec 29 12:04:52 2008
@@ -2089,8 +2089,7 @@
 						ast_pbx_run_args(peer, &args);
 					}
 					ast_free(gosub_args);
-					if (option_debug)
-						ast_log(LOG_DEBUG, "Gosub exited with status %d\n", res9);
+					ast_debug(1, "Gosub exited with status %d\n", res9);
 				} else {
 					ast_log(LOG_ERROR, "Could not Allocate string for Gosub arguments -- Gosub Call Aborted!\n");
 				}

Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?view=diff&rev=166861&r1=166860&r2=166861
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Mon Dec 29 12:04:52 2008
@@ -4014,9 +4014,12 @@
 				if (gosub_args) {
 					res = pbx_exec(peer, application, gosub_args);
 					if (!res) {
-						ast_pbx_run(peer);
+						struct ast_pbx_args args;
+						memset(&args, 0, sizeof(args));
+						args.no_hangup_chan = 1;
+						ast_pbx_run_args(peer, &args);
 					}
-					free(gosub_args);
+					ast_free(gosub_args);
 					ast_debug(1, "Gosub exited with status %d\n", res);
 				} else {
 					ast_log(LOG_ERROR, "Could not Allocate string for Gosub arguments -- Gosub Call Aborted!\n");
@@ -6693,7 +6696,7 @@
 	if (!con)
 		ast_log(LOG_ERROR, "Queue virtual context 'app_queue_gosub_virtual_context' does not exist and unable to create\n");
 	else
-		ast_add_extension2(con, 1, "s", 1, NULL, NULL, "KeepAlive", ast_strdup(""), ast_free_ptr, "app_queue");
+		ast_add_extension2(con, 1, "s", 1, NULL, NULL, "NoOp", ast_strdup(""), ast_free_ptr, "app_queue");
 
 	if (queue_persistent_members)
 		reload_queue_members();




More information about the svn-commits mailing list