aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-18 19:40:14 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-18 19:40:14 +0000
commit5a14fd208613cdb2160fb4ef17b42ef54e32553c (patch)
tree7973cb23363a7766c7cf2aac42886826f61fa910 /apps/app_dial.c
parent3c03ae0b1c8dbf64f75a169cb719faa2d53777e9 (diff)
Merged revisions 165723 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r165723 | russell | 2008-12-18 13:33:42 -0600 (Thu, 18 Dec 2008) | 14 lines Remove the need for AST_PBX_KEEPALIVE with the GoSub option from Dial. This is part of an effort to completely remove AST_PBX_KEEPALIVE and other similar return codes from the source. While this usage was perfectly safe, there are others that are problematic. Since we know ahead of time that we do not want to PBX to destroy the channel, the PBX API has been changed so that information can be provided as an argument, instead, thus removing the need for the KEEPALIVE return value. Further changes to get rid of KEEPALIVE and related code is being done by murf. There is a patch up for that on review 29. Review: http://reviewboard.digium.com/r/98/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@165726 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r--apps/app_dial.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 0021015bd..fd815b644 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1833,7 +1833,11 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
if (gosub_args) {
res = pbx_exec(peer, theapp, gosub_args);
if (!res) {
- ast_pbx_run(peer);
+ struct ast_pbx_args args;
+ /* A struct initializer fails to compile for this case ... */
+ memset(&args, 0, sizeof(args));
+ args.no_hangup_chan = 1;
+ ast_pbx_run_args(peer, &args);
}
ast_free(gosub_args);
if (option_debug)
@@ -2154,7 +2158,7 @@ static int load_module(void)
if (!con)
ast_log(LOG_ERROR, "Dial virtual context 'app_dial_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_dial");
+ ast_add_extension2(con, 1, "s", 1, NULL, NULL, "NoOp", ast_strdup(""), ast_free_ptr, "app_dial");
res = ast_register_application(app, dial_exec, synopsis, descrip);
res |= ast_register_application(rapp, retrydial_exec, rsynopsis, rdescrip);