Skip to content
This repository has been archived by the owner on Aug 1, 2020. It is now read-only.
/ readsb Public archive

Commit

Permalink
Fix queueing/resending very old Mode A/C messages.
Browse files Browse the repository at this point in the history
Fixes #47.
  • Loading branch information
mutability committed Jun 7, 2015
1 parent 03ba828 commit f58ff14
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]> Thu, 19 Feb 2015 22:39:19 +0000

Expand Down
9 changes: 4 additions & 5 deletions mode_s.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit f58ff14

Please sign in to comment.