When view1090 reconnects, re-send our connection settings on the new connection
This commit is contained in:
parent
59170cbacb
commit
fb110802d6
15
view1090.c
15
view1090.c
|
|
@ -130,6 +130,13 @@ void showHelp(void) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sendSettings(struct client *c)
|
||||||
|
{
|
||||||
|
sendBeastSettings(c, "CdV"); // Beast binary format, no filters, verbatim mode on
|
||||||
|
sendBeastSettings(c, Modes.mode_ac ? "J" : "j"); // Mode A/C on or off
|
||||||
|
sendBeastSettings(c, Modes.check_crc ? "f" : "F"); // CRC checks on or off
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
//
|
//
|
||||||
|
|
@ -206,10 +213,7 @@ int main(int argc, char **argv) {
|
||||||
fprintf(stderr, "Failed to connect to %s:%d: %s\n", bo_connect_ipaddr, bo_connect_port, Modes.aneterr);
|
fprintf(stderr, "Failed to connect to %s:%d: %s\n", bo_connect_ipaddr, bo_connect_port, Modes.aneterr);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
sendSettings(c);
|
||||||
sendBeastSettings(c, "CdV"); // Beast binary format, no filters, verbatim mode on
|
|
||||||
sendBeastSettings(c, Modes.mode_ac ? "J" : "j"); // Mode A/C on or off
|
|
||||||
sendBeastSettings(c, Modes.check_crc ? "f" : "F"); // CRC checks on or off
|
|
||||||
|
|
||||||
// Keep going till the user does something that stops us
|
// Keep going till the user does something that stops us
|
||||||
while (!Modes.exit) {
|
while (!Modes.exit) {
|
||||||
|
|
@ -225,6 +229,9 @@ int main(int argc, char **argv) {
|
||||||
// lost input connection, try to reconnect
|
// lost input connection, try to reconnect
|
||||||
sleep(1);
|
sleep(1);
|
||||||
c = serviceConnect(s, bo_connect_ipaddr, bo_connect_port);
|
c = serviceConnect(s, bo_connect_ipaddr, bo_connect_port);
|
||||||
|
if (c) {
|
||||||
|
sendSettings(c);
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue