From: Frank Kardel Date: Sun, 17 Feb 2008 08:38:07 +0000 (+0000) Subject: ntpd.c: X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0fd924d474b0a6156e00b2ddb5ed2c770267aeb;p=thirdparty%2Fntp.git ntpd.c: Bug 1000: avoid timer() starvation during high load conditions ChangeLog: Bug 1000: additionally fix timer() starvation during high load bk: 47b7f26fO1WZPiVElSf7HPD28BwH3Q --- diff --git a/ChangeLog b/ChangeLog index 5200f65d41..e003139936 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ * [Bug 1000] allow implicit receive buffer allocation for Windows fixes startup for windows systems with many interfaces reduces dropped packets on network bursts + additionally fix timer() starvation during high load --- (4.2.4p4) Released by Harlan Stenn diff --git a/ntpd/ntpd.c b/ntpd/ntpd.c index b894e71f82..04e0d07f94 100644 --- a/ntpd/ntpd.c +++ b/ntpd/ntpd.c @@ -1085,8 +1085,19 @@ getgroup: rbuf = get_full_recv_buffer(); while (rbuf != NULL) { + if (alarm_flag) + { + was_alarmed = 1; + alarm_flag = 0; + } UNBLOCK_IO_AND_ALARM(); + if (was_alarmed) + { /* avoid timer starvation during lengthy I/O handling */ + timer(); + was_alarmed = 0; + } + /* * Call the data procedure to handle each received * packet.