aboutsummaryrefslogtreecommitdiffstats
path: root/main/autoservice.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-07 15:40:59 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-07 15:40:59 +0000
commitf8664dcebad9f9f7f72df24bda762cbc2863c379 (patch)
tree4679a1777b1f410d8d45fb7374982327c2406294 /main/autoservice.c
parenta3c8389dc99a7b623a789ae04e88ebedf4dbed51 (diff)
Merged revisions 91737 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r91737 | mmichelson | 2007-12-07 09:39:58 -0600 (Fri, 07 Dec 2007) | 7 lines Hangups that happen during autoservice were not processed appropriately. This is because a hangup actually causes a NULL frame to be received, not a hangup frame. Queueing a hangup if we receive a NULL frame during autoservice corrects this problem (closes issue #11467, reported by jmls, patched by me) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91738 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/autoservice.c')
-rw-r--r--main/autoservice.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/main/autoservice.c b/main/autoservice.c
index 568cf1070..bb0791fca 100644
--- a/main/autoservice.c
+++ b/main/autoservice.c
@@ -81,8 +81,11 @@ static void *autoservice_run(void *ign)
if ((chan = ast_waitfor_n(mons, x, &ms))) {
struct ast_frame *f = ast_read(chan);
- if (!f)
+ if (!f) {
+ /* NULL means we got a hangup*/
+ ast_queue_hangup(chan);
continue;
+ }
/* Do not add a default entry in this switch statement. Each new
* frame type should be addressed directly as to whether it should