diff --git a/debian/changelog b/debian/changelog index 09f2459..7787566 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ dump1090-mutability (1.15~dev) UNRELEASED; urgency=medium received data clobbering old data under CPU overload. * Fix endian issues affecting big-endian hosts in Beast input/output and avrmlat output. (github issue #44) + * Fix queueing/resending very old Mode A/C messages (github issue #47) -- Oliver Jowett Thu, 19 Feb 2015 22:39:19 +0000 diff --git a/mode_s.c b/mode_s.c index 090aff6..53fd806 100644 --- a/mode_s.c +++ b/mode_s.c @@ -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); } }