]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Hangups that happen during autoservice were not processed appropriately. This is
authorMark Michelson <mmichelson@digium.com>
Fri, 7 Dec 2007 15:39:58 +0000 (15:39 +0000)
committerMark Michelson <mmichelson@digium.com>
Fri, 7 Dec 2007 15:39:58 +0000 (15:39 +0000)
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@91737 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/autoservice.c

index dc5ad81bf23032eea4af811462db060bd1d63ccb..f6887f638ba9d7852c0eb5dd3ae5f896c052bfc3 100644 (file)
@@ -90,8 +90,11 @@ static void *autoservice_run(void *ign)
                if (chan) {
                        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