Take a contact from another station without reopening the contest
AppSession.TakeFromNetwork wrote the contact to the store and then called OpenContest to see it, which built a new ContestSession, read the whole log back and built new entry positions. Anything the operator was typing at either radio went with them, and the entry boxes were rebuilt under the other operator's hands. It also ran on the socket thread, so it was changing the log while the windows were reading it. ContestSession now applies the three messages itself: AddFromNetwork, ReplaceFromNetwork and DeleteFromNetwork write the store, change the log in place and raise Changed. None of them raises Logged, Edited or Deleted, so nothing goes back out to the other stations. Points and multipliers are still worked out here from the rules rather than trusted. A contact that arrives goes in where its timestamp says it belongs, through the new ContestLog.Insert, and the log is scored again: of two stations that worked the same multiplier, the one that worked it first keeps it, however late the message turns up. Add would have appended it at the end and given the multiplier to the wrong contact. The socket thread now hands the update to the thread the windows run on, which is where every other change to the log is made. The matching rule moved with the code, so ContestSession answers what a message from N1MM refers to: the contact id, then the call and time it had before the edit. Still not tested against a second station. Two of these cannot run on one host to try it, because they share one UDP port. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RoGtneMQaz4M9w7Kk49AVD
This commit is contained in:
@@ -657,6 +657,12 @@ An incoming edit or delete is matched by contact id first. N1MM does not know
|
||||
our ids, so the call and the timestamp are the fallback — that is the pair N1MM
|
||||
itself keys a contact on.
|
||||
|
||||
A contact that arrives is put into the log where its timestamp says it belongs
|
||||
and the log is scored again, so of two stations that worked the same multiplier
|
||||
the one that worked it first keeps it, however late the message turns up.
|
||||
Nothing else moves: what is being typed at either radio is left alone, and the
|
||||
windows redraw where they stand.
|
||||
|
||||
## Layout
|
||||
|
||||
| Project | What it holds |
|
||||
|
||||
Reference in New Issue
Block a user