Count from the log again on Reset Serial Numbers
The button started the numbers again at one. N1MM's manual says it "sets serial numbers on all computers to the highest value in any of the logs, plus 1", and its own handler re-reads the highest number per band out of the log, so a mixed network came apart at exactly the point the button is meant to repair: the N1MM stations counted on from the highest number and this one started at one, sending numbers that had already gone out. ContestSession.RestartNumbers fills the pool from the log, which is where the reset now lands. SerialNumbersFrom is gone with it, and so is the pool this station sent afterwards: N1MM sends none, because each station works the same number out of its own copy of the log. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015NZkFxHde1iifAQemFTHxf
This commit is contained in:
@@ -378,7 +378,8 @@ public sealed partial class NetworkStatusWindow : RefreshableWindow
|
||||
}
|
||||
}
|
||||
|
||||
/// Starts the serial numbers again at one, here and at every station.
|
||||
/// Counts the serial numbers from the log again, here and at every
|
||||
/// station: the next number is the highest one logged plus one.
|
||||
private async void OnResetSerialNumbers(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
if (link is null)
|
||||
@@ -387,7 +388,7 @@ public sealed partial class NetworkStatusWindow : RefreshableWindow
|
||||
}
|
||||
session.ResetSerialNumbers();
|
||||
await link.SendResetSerialNumbersAsync();
|
||||
Say("serial numbers start again at one");
|
||||
Say($"serial numbers start again at {session.Logging?.NextNumberOn(null)}");
|
||||
}
|
||||
|
||||
private void OnLogEverywhereChanged(object? sender, RoutedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user