From: Frank Kardel Date: Sat, 7 Oct 2006 19:42:28 +0000 (+0000) Subject: ntp_io.c: X-Git-Tag: NTP_4_2_3P52~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e89b31d040658c6d18252412544ea9fe48ad6c59;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 b3b70ae3f..59cb367be 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 */