4b595f
commit 241d8a064efa535029e28b87a8995add3cca8c0c
4b595f
Author: Miroslav Lichvar <mlichvar@redhat.com>
4b595f
Date:   Tue Sep 25 18:16:19 2018 +0200
4b595f
4b595f
    unicast: Process timeouts equal to current time.
4b595f
    
4b595f
    Don't postpone processing of a timeout if it is equal to the current
4b595f
    time. This prevents an infinite loop with a simulated clock.
4b595f
    
4b595f
    Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
4b595f
4b595f
diff --git a/unicast_service.c b/unicast_service.c
4b595f
index ad0e06a..9c9b95b 100644
4b595f
--- a/unicast_service.c
4b595f
+++ b/unicast_service.c
4b595f
@@ -502,7 +502,7 @@ int unicast_service_timer(struct port *p)
4b595f
 		pr_debug("peek i={2^%d} tmo={%ld,%ld}", interval->log_period,
4b595f
 			 interval->tmo.tv_sec, interval->tmo.tv_nsec);
4b595f
 
4b595f
-		if (timespec_compare(&now, &interval->tmo) >= 0) {
4b595f
+		if (timespec_compare(&now, &interval->tmo) > 0) {
4b595f
 			break;
4b595f
 		}
4b595f
 		interval = pqueue_extract(p->unicast_service->queue);