Skip to content

Commit

Permalink
conns.json wip
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf committed Jun 4, 2024
1 parent a833577 commit 9ec2a23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions readsb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1950,6 +1950,9 @@ 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], "provokeSegfault") == 0) {
Modes.debug_provoke_segfault = 1;
}
Expand Down Expand Up @@ -2554,6 +2557,8 @@ 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)
free(writeJsonToFile(Modes.json_dir, "clients.json", generateClientsJson()).buffer);
if (Modes.netReceiverIdJson)
Expand Down
1 change: 1 addition & 0 deletions readsb.h
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@ struct _Modes
int8_t netReceiverIdPrint;
int8_t netReceiverIdJson;
int8_t netIngest;
int8_t enableConnsJson;
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;
Expand Down

0 comments on commit 9ec2a23

Please sign in to comment.