Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check iExit when trying to connect to objects #200

Merged
merged 10 commits into from
Jan 24, 2020
3 changes: 1 addition & 2 deletions server/src/objectcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,6 @@ void objectcontrol_task(TimeType * GPSTime, GSDType * GSD, LOG_LEVEL logLevel) {
"[ObjectControl] Was not able to connect to object, [IP: %s] [PORT: %d], retry in %d sec...",
object_address_name[iIndex], object_tcp_port[iIndex],
(!(1 & DisconnectU8)) * 3);
(void)sleep(3); // TODO: Move this to the rest of the sleep operations? Also, remove the hardcoded 3
break;
case EADDRINUSE:
util_error("[ObjectControl] Local address/port already in use");
Expand Down Expand Up @@ -878,7 +877,7 @@ void objectcontrol_task(TimeType * GPSTime, GSDType * GSD, LOG_LEVEL logLevel) {

}

} while (iResult < 0 && DisconnectU8 == 0);
} while (iExit == 0 && iResult < 0 && DisconnectU8 == 0);

if (iResult >= 0) {
/* Send OSEM command in mq so that we get some information like GPSweek, origin (latitude,logitude,altitude in gps coordinates) */
Expand Down