aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-13 21:44:53 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-13 21:44:53 +0000
commita4bf26f8b263392875dbe8f7fefe7e7b7fda220f (patch)
treed9b1df254ec77d80220bd341f62674877890c45e
parentf20599a410eed71d8f07ac89a13db13c4745aef2 (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@122713 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/autoservice.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/autoservice.c b/main/autoservice.c
index a967388cb..a681b0f1d 100644
--- a/main/autoservice.c
+++ b/main/autoservice.c
@@ -106,6 +106,10 @@ static void *autoservice_run(void *ign)
AST_LIST_UNLOCK(&aslist);
+ if (!x) {
+ continue;
+ }
+
chan = ast_waitfor_n(mons, x, &ms);
if (!chan) {
continue;