From d6c06127674959be37fa3789f55a4fdf81fb7003 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Tue, 20 Feb 2018 00:24:39 +1300 Subject: [PATCH] Remove doubled-up banner/header code --- net_io.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/net_io.c b/net_io.c index 7229194..5cfc629 100644 --- a/net_io.c +++ b/net_io.c @@ -2021,39 +2021,15 @@ static const char *sil_type_enum_string(sil_type_t type) } } -static void writeFATSVBanner() -{ - char *p = prepareWrite(&Modes.fatsv_out, TSV_MAX_PACKET_SIZE); - if (!p) - return; - char *end = p + TSV_MAX_PACKET_SIZE; - - p = appendFATSV(p, end, "faup1090_format_version", "%s", "2"); - - --p; // remove last tab - p = safe_snprintf(p, end, "\n"); - - if (p <= end) - completeWrite(&Modes.fatsv_out, p); - else - fprintf(stderr, "fatsv: output too large (max %d, overran by %d)\n", TSV_MAX_PACKET_SIZE, (int) (p - end)); -} - static void writeFATSV() { struct aircraft *a; static uint64_t next_update; - static int first_run = 1; if (!Modes.fatsv_out.service || !Modes.fatsv_out.service->connections) { return; // not enabled or no active connections } - if (first_run) { - writeFATSVBanner(); - first_run = 0; - } - uint64_t now = mstime(); if (now < next_update) { return;