From ecbdbf23d676d1eae1c0f518243d9790db65c74a Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Thu, 21 Jan 2016 17:48:06 +0000 Subject: [PATCH] Never forward mlat via SBS or raw output; it is no longer identifiable as mlat when forwarded on those paths. --- net_io.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/net_io.c b/net_io.c index 9a7eee9..361c668 100644 --- a/net_io.c +++ b/net_io.c @@ -643,12 +643,16 @@ static void send_sbs_heartbeat(struct net_service *service) //========================================================================= // void modesQueueOutput(struct modesMessage *mm, struct aircraft *a) { - if ((mm->bFlags & MODES_ACFLAGS_FROM_MLAT) && !Modes.forward_mlat) - return; + int is_mlat = ((mm->bFlags & MODES_ACFLAGS_FROM_MLAT) != 0); - modesSendSBSOutput(mm, a); - modesSendBeastOutput(mm); - modesSendRawOutput(mm); + if (!is_mlat) { + modesSendSBSOutput(mm, a); + modesSendRawOutput(mm); + } + + if (!is_mlat || Modes.forward_mlat) { + modesSendBeastOutput(mm); + } } // //=========================================================================