Fix queueing/resending very old Mode A/C messages.

Fixes #47.
This commit is contained in:
Oliver Jowett 2015-06-07 23:00:24 +01:00
parent 03ba828f8d
commit f58ff14d7c
2 changed files with 5 additions and 5 deletions

View file

@ -1221,18 +1221,17 @@ void useModesMessage(struct modesMessage *mm) {
// Otherwise, apply a sanity-check filter and only
// forward messages when we have seen two of them.
// TODO: buffer the original message and forward it when we
// see a second message?
if (Modes.net) {
if (Modes.net_verbatim || a->messages > 1) {
if (Modes.net_verbatim || mm->msgtype == 32) {
// Unconditionally send
modesQueueOutput(mm);
} else if (a->messages > 1) {
// If this is the second message, and we
// squelched the first message, then re-emit the
// first message now.
if (!Modes.net_verbatim && a->messages == 2) {
modesQueueOutput(&a->first_message);
}
modesQueueOutput(mm);
}
}