Issue a warning when the path delay turns out negative.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2011-12-30 11:08:54 +01:00
parent e47549e73f
commit 0536aa7413
1 changed files with 7 additions and 7 deletions

14
clock.c
View File

@ -356,13 +356,13 @@ void clock_path_delay(struct clock *c, struct timespec req, struct timestamp rx,
pd = tmv_div(pd, 2);
if (pd < 0) {
pr_debug("negative path delay %10lld", pd);
pr_debug("path_delay = (t2 - t3) + (t4 - t1)");
pr_debug("t2 - t3 = %+10lld", t2 - t3);
pr_debug("t4 - t1 = %+10lld", t4 - t1);
pr_debug("c1 %10lld", c1);
pr_debug("c2 %10lld", c2);
pr_debug("c3 %10lld", c3);
pr_warning("negative path delay %10lld", pd);
pr_warning("path_delay = (t2 - t3) + (t4 - t1)");
pr_warning("t2 - t3 = %+10lld", t2 - t3);
pr_warning("t4 - t1 = %+10lld", t4 - t1);
pr_warning("c1 %10lld", c1);
pr_warning("c2 %10lld", c2);
pr_warning("c3 %10lld", c3);
return;
}