From: Frank Kardel Date: Sat, 7 Oct 2006 19:42:28 +0000 (+0000) Subject: ntp_io.c: X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1d986576c798f8f4684bb2e99b955cbc28581ed;p=thirdparty%2Fntp.git ntp_io.c: allow asyncio_readers to remove themselves when being run bk: 45280324A419b-MWuelYUjU1hM0IIA --- diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c index b3b70ae3fd..59cb367be3 100644 --- a/ntpd/ntp_io.c +++ b/ntpd/ntp_io.c @@ -3046,14 +3046,16 @@ input_handler( /* * scan list of asyncio readers - currently only used for routing sockets */ - for (asyncio_reader = ISC_LIST_TAIL(asyncio_reader_list); - asyncio_reader != NULL; - asyncio_reader = ISC_LIST_PREV(asyncio_reader, link)) + asyncio_reader = ISC_LIST_TAIL(asyncio_reader_list); + + while (asyncio_reader != NULL) { + struct asyncio_reader *next = ISC_LIST_PREV(asyncio_reader, link); if (FD_ISSET(asyncio_reader->fd, &fds)) { ++select_count; asyncio_reader->receiver(asyncio_reader); } + asyncio_reader = next; } #endif /* HAS_ROUTING_SOCKET */