dcavalca / rpms / linuxptp

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