From 8940e866217f955a44109d77910c70f781a85cde Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Fri, 13 Jun 2008 21:47:53 +0000 Subject: [PATCH] Merged revisions 122714 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r122714 | mmichelson | 2008-06-13 16:45:21 -0500 (Fri, 13 Jun 2008) | 17 lines Merged revisions 122713 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r122713 | mmichelson | 2008-06-13 16:44:53 -0500 (Fri, 13 Jun 2008) | 9 lines Short circuit the loop in autoservice_run if there are no channels to poll. If we continued, then the result would be calling poll() with a NULL pollfd array. While this is fine with POSIX's poll(2) system call, those who use Asterisk's internal poll mechanism (Darwin systems) would have a failed assertion occur when poll is called. (related to issue #10342) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@122715 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/autoservice.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main/autoservice.c b/main/autoservice.c index 636e95dd36..1f18dee25f 100644 --- a/main/autoservice.c +++ b/main/autoservice.c @@ -101,6 +101,10 @@ static void *autoservice_run(void *ign) AST_LIST_UNLOCK(&aslist); + if (!x) { + continue; + } + chan = ast_waitfor_n(mons, x, &ms); if (!chan) { continue;