diff --git a/readsb.c b/readsb.c index bd1a3618..4705bfed 100644 --- a/readsb.c +++ b/readsb.c @@ -1960,8 +1960,8 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) { if (strcasecmp(token[0], "disableAcasJson") == 0) { Modes.enableAcasJson = 0; } - if (strcasecmp(token[0], "enableConnsJson") == 0) { - Modes.enableConnsJson = 1; + if (strcasecmp(token[0], "enableClientsJson") == 0) { + Modes.enableClientsJson = 1; } if (strcasecmp(token[0], "tar1090NoGlobe") == 0) { Modes.tar1090_no_globe = 1; @@ -2575,12 +2575,14 @@ static void miscStuff(int64_t now) { static int64_t next_clients_json; if (Modes.json_dir && now > next_clients_json) { next_clients_json = now + 10 * SECONDS; - if (Modes.enableConnsJson) { - } - if (Modes.netIngest) + + if (Modes.netIngest || Modes.enableClientsJson) { free(writeJsonToFile(Modes.json_dir, "clients.json", generateClientsJson()).buffer); - if (Modes.netReceiverIdJson) + } + + if (Modes.netReceiverIdJson) { free(writeJsonToFile(Modes.json_dir, "receivers.json", generateReceiversJson()).buffer); + } return; } diff --git a/readsb.h b/readsb.h index 434196ed..2f8385d1 100644 --- a/readsb.h +++ b/readsb.h @@ -694,7 +694,7 @@ struct _Modes int8_t netReceiverIdPrint; int8_t netReceiverIdJson; int8_t netIngest; - int8_t enableConnsJson; + int8_t enableClientsJson; int8_t forward_mlat; // forward beast mlat messages to beast output ports int8_t forward_mlat_sbs; // forward mlat messages to sbs output ports int8_t beast_forward_noforward;