Use standard MODES_NET_SERVICES_NUM in faup1090
For faup1090 only the FlightAware service is enabled and we were shortening the services table by using our own define of FAUP_NET_SERVICES_NUM and having it set to 1. Apps need to stick with the same number of services as defined by MODES_NET_SERVICES_NUM in dump1090 because dump1090 support routine modesAcceptClients loops on this constant to walk the services table. Likewise we now define all the service ports dump1090 defines even though we are not using them. We have configured them as disabled. Version bump to 1.14.
This commit is contained in:
parent
c7888add7e
commit
bd690db2b3
25
faup1090.c
25
faup1090.c
|
|
@ -146,21 +146,22 @@ struct service {
|
||||||
int enabled;
|
int enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define FAUP_NET_SERVICES_NUM 1
|
extern struct service services[MODES_NET_SERVICES_NUM];
|
||||||
|
|
||||||
extern struct service services[FAUP_NET_SERVICES_NUM];
|
|
||||||
|
|
||||||
void faupInitNet(void) {
|
void faupInitNet(void) {
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
struct service svc[FAUP_NET_SERVICES_NUM] = {
|
// for faup1090 only the FlightAware service is enabled.
|
||||||
// {"Raw TCP output", &Modes.ros, Modes.net_output_raw_port, 0},
|
// we need to stick with the same number of services as defined in
|
||||||
// {"Raw TCP input", &Modes.ris, Modes.net_input_raw_port, 0},
|
// dump1090 because dump1090 support routines expect this many.
|
||||||
// {"Beast TCP output", &Modes.bos, Modes.net_output_beast_port, 0},
|
struct service svc[MODES_NET_SERVICES_NUM] = {
|
||||||
// {"Beast TCP input", &Modes.bis, Modes.net_input_beast_port, 0},
|
{"FlightAware TSV output", &Modes.fatsvos, Modes.net_fatsv_port, 1},
|
||||||
// {"HTTP server", &Modes.https, Modes.net_http_port, 0},
|
{"Raw TCP output", &Modes.ros, Modes.net_output_raw_port, 0},
|
||||||
// {"Basestation TCP output", &Modes.sbsos, Modes.net_output_sbs_port, 0},
|
{"Raw TCP input", &Modes.ris, Modes.net_input_raw_port, 0},
|
||||||
{"FlightAware TSV output", &Modes.fatsvos, Modes.net_fatsv_port, 1}
|
{"Beast TCP output", &Modes.bos, Modes.net_output_beast_port, 0},
|
||||||
|
{"Beast TCP input", &Modes.bis, Modes.net_input_beast_port, 0},
|
||||||
|
{"HTTP server", &Modes.https, Modes.net_http_port, 0},
|
||||||
|
{"Basestation TCP output", &Modes.sbsos, Modes.net_output_sbs_port, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
memcpy(&services, &svc, sizeof(svc));//services = svc;
|
memcpy(&services, &svc, sizeof(svc));//services = svc;
|
||||||
|
|
@ -178,7 +179,7 @@ void faupInitNet(void) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (j = 0; j < FAUP_NET_SERVICES_NUM; j++) {
|
for (j = 0; j < MODES_NET_SERVICES_NUM; j++) {
|
||||||
services[j].enabled = (services[j].port != 0);
|
services[j].enabled = (services[j].port != 0);
|
||||||
if (services[j].enabled) {
|
if (services[j].enabled) {
|
||||||
int s = anetTcpServer(Modes.aneterr, services[j].port, NULL);
|
int s = anetTcpServer(Modes.aneterr, services[j].port, NULL);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "dump1090.h"
|
#include "dump1090.h"
|
||||||
|
|
||||||
#define FAUP1090_VERSION "1.13"
|
#define FAUP1090_VERSION "1.14"
|
||||||
|
|
||||||
#undef MODES_NET_INPUT_RAW_PORT
|
#undef MODES_NET_INPUT_RAW_PORT
|
||||||
#define MODES_NET_INPUT_RAW_PORT 0
|
#define MODES_NET_INPUT_RAW_PORT 0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue