up
This commit is contained in:
@@ -359,6 +359,7 @@ type App struct {
|
||||
dvkRecSlot int // slot currently being recorded (DVKStartRecord → DVKStopRecord)
|
||||
dvkPttKeyed bool // we keyed PTT for a voice message; unkey when it ends
|
||||
pttMu sync.Mutex
|
||||
udpLogMu sync.Mutex // serialises UDP auto-log so concurrent packets can't both pass the dedup check
|
||||
pttPort serial.Port // open serial port while PTT (RTS/DTR) is asserted
|
||||
pttKeyedMethod string // "cat" | "rts" | "dtr" while keyed; "" when idle
|
||||
pttGen int64 // bumped on every key; a delayed unkey only fires if unchanged (guards against a stale release cutting a new transmission)
|
||||
@@ -5273,11 +5274,18 @@ func (a *App) LogUDPLoggedADIF(adifText string) (int64, error) {
|
||||
a.refineDistrictZones(&q) // W6 → CQ3/ITU6 for zone-split countries
|
||||
a.applyQSLDefaults(&q)
|
||||
|
||||
// ── Dedup ──
|
||||
// ── Dedup (serialised) ──
|
||||
// Match by call + band + mode within a ±2-minute window: a QSO logged
|
||||
// manually in OpsLog and re-broadcast by Log4OM over UDP often differs by
|
||||
// a minute (the two apps stamp their own time), so a minute-exact key
|
||||
// missed it and the contact got duplicated.
|
||||
//
|
||||
// The check + insert is guarded by udpLogMu: MSHV/WSJT can deliver the same
|
||||
// logged-QSO packet twice in quick succession (re-broadcast, or two
|
||||
// listeners), and without serialisation both goroutines read the dedup set
|
||||
// BEFORE either inserts, both pass, and the QSO lands twice.
|
||||
a.udpLogMu.Lock()
|
||||
defer a.udpLogMu.Unlock()
|
||||
seen, err := a.qso.ExistingDedupeKeys(a.ctx)
|
||||
if err == nil {
|
||||
base := q.QSODate.UTC()
|
||||
|
||||
Reference in New Issue
Block a user