mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-10-16 10:49:34 +00:00
tweak ra timer code to avoid missing events.
This commit is contained in:
1 parent
5d71d83420
commit
7dbe98147d
1 file changed
+3
-3
+3
-3
@@ -395,11 +395,11 @@ time_t periodic_ra(time_t now)
|
||||
for (next_event = 0, context = daemon->ra_contexts; context; context = context->next)
|
||||
if (context->ra_time != 0)
|
||||
{
|
||||
if (difftime(context->ra_time, now) < 0.0)
|
||||
if (difftime(context->ra_time, now) <= 0.0)
|
||||
break; /* overdue */
|
||||
|
||||
if (next_event == 0 || difftime(next_event, context->ra_time + 2) > 0.0)
|
||||
next_event = context->ra_time + 2;
|
||||
if (next_event == 0 || difftime(next_event, context->ra_time) > 0.0)
|
||||
next_event = context->ra_time;
|
||||
}
|
||||
|
||||
/* none overdue */
|
||||
|
||||
Reference in new issue
Block a user