Miroslav Lichvar
2013-05-28 12:27:38 UTC
When a new master is selected, drop the old path delay and don't
calculate the offset until the delay is measured again with the new
master.
Signed-off-by: Miroslav Lichvar <***@redhat.com>
---
clock.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/clock.c b/clock.c
index eceedc5..0353b5a 100644
--- a/clock.c
+++ b/clock.c
@@ -1132,6 +1132,7 @@ static void handle_state_decision_event(struct clock *c)
if (!cid_eq(&best->dataset.identity, &c->best_id)) {
clock_freq_est_reset(c);
mave_reset(c->avg_delay);
+ c->path_delay = 0;
fresh_best = 1;
}
calculate the offset until the delay is measured again with the new
master.
Signed-off-by: Miroslav Lichvar <***@redhat.com>
---
clock.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/clock.c b/clock.c
index eceedc5..0353b5a 100644
--- a/clock.c
+++ b/clock.c
@@ -1132,6 +1132,7 @@ static void handle_state_decision_event(struct clock *c)
if (!cid_eq(&best->dataset.identity, &c->best_id)) {
clock_freq_est_reset(c);
mave_reset(c->avg_delay);
+ c->path_delay = 0;
fresh_best = 1;
}
--
1.8.1.4
1.8.1.4