Enable the correct number of net services in faup1090

faup1090 was using the wrong constant, MODES_NET_SERVICES_NUM, rather than
FAUP_NET_SERVICES_NUM, so it ran off the end of an array binding random
ports until failing when it tried to bind the FlightAware port a second time.

Thanks to Oliver Jowett (github user "mutability") for the fix.
This commit is contained in:
Karl Lehenbauer 2014-10-01 10:02:40 -05:00
parent e6f2cc5624
commit 709889dd5c
1 changed files with 1 additions and 1 deletions

View File

@ -178,7 +178,7 @@ void faupInitNet(void) {
}
#endif
for (j = 0; j < MODES_NET_SERVICES_NUM; j++) {
for (j = 0; j < FAUP_NET_SERVICES_NUM; j++) {
services[j].enabled = (services[j].port != 0);
if (services[j].enabled) {
int s = anetTcpServer(Modes.aneterr, services[j].port, NULL);