aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-21 16:02:12 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-21 16:02:12 +0000
commit1108195e5b2814451ec22c190be7d0ca2d9ead10 (patch)
tree233fc1c8f5d9bd9ffedc123671b0cea898b45e93 /main
parent97ce3dbf31ec080fbaa0374e8096213c360c2c21 (diff)
Fix documentation for ast_softhangup() and correct the misuse thereof.
(closes issue #16103) Reported by: majorbloodnok git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@225105 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/pbx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/pbx.c b/main/pbx.c
index 7cf669c1f..6fe2c3c73 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -2504,8 +2504,9 @@ static int __ast_pbx_run(struct ast_channel *c)
}
if (!found && !error)
ast_log(LOG_WARNING, "Don't know what to do with '%s'\n", c->name);
- if (res != AST_PBX_KEEPALIVE)
- ast_softhangup(c, c->hangupcause ? c->hangupcause : AST_CAUSE_NORMAL_CLEARING);
+ if (res != AST_PBX_KEEPALIVE) {
+ ast_softhangup(c, AST_SOFTHANGUP_APPUNLOAD);
+ }
ast_channel_lock(c);
if ((emc = pbx_builtin_getvar_helper(c, "EXIT_MACRO_CONTEXT"))) {
emc = ast_strdupa(emc);