Merged revisions 91737 via svnmerge from
[asterisk/asterisk.git] / main / autoservice.c
index 568cf10..bb0791f 100644 (file)
@@ -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