}
if (best_so_far == -1) {
// no master clock
- if (old_master != -1) {
+ //if (old_master != -1) {
// but there was a master clock, so remove it
- debug(2, "Remove master clock.");
+ debug(1, "Remove master clock.");
update_master_clock_info(0, NULL, 0, 0, 0);
- }
+ //}
if (timing_peer_count == 0)
debug(2, "no valid qualified clocks ");
else
clock_private_info[i].flags &=
~(1 << clock_is_a_timing_peer); // turn off peer flag (but not the master flag!)
clock_private_info[i].announcements_without_followups = 0; // to allow a possibly silent clocks to be revisited when added to a timing peer list
- if ((clock_private_info[i].flags &= ~(1 << clock_is_master)) != 0) {
- clock_private_info[i].mastership_start_time = get_time_now(); // mastership is reset to this time...
+ if (strlen(buf) == 1) { // if it's giving an empty timing peer list, that means drop mastership from the past
+ clock_private_info[i].flags &= ~(1 << clock_is_master);
+ clock_private_info[i].mastership_start_time = 0;
clock_private_info[i].previous_offset_time = 0;
}
}