]> git.ipfire.org Git - thirdparty/nqptp.git/commitdiff
Allow a new master to do a full resync when it becomes master. It seems that they...
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Wed, 12 May 2021 11:51:48 +0000 (12:51 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Wed, 12 May 2021 11:51:48 +0000 (12:51 +0100)
nqptp-clock-sources.c

index e1567e24d4cf2a873b997e6d64067ea9251dacb7..fd022b0dd8957e3a2204097ab373b93d3da084dc 100644 (file)
@@ -214,6 +214,7 @@ void update_master() {
     clocks_private[best_so_far].flags |= (1 << clock_is_master);
     // master_clock_index = best_so_far;
     if (old_master != best_so_far) {
+      clocks_private[best_so_far].previous_offset_time = 0; // allow full resync
       update_master_clock_info(clocks_private[best_so_far].clock_id,
                                (const char *)&clocks_private[best_so_far].ip,
                                clocks_private[best_so_far].local_time,