Assorted bug fixes

- In network.c and asynnet.c code was added to close the socket when a
  connect failed. Otherwise the socket would leak and the process
  runs out of file descriptors.
- Multicountserc now forcefully handles the counting status. Before I had
  the status flickering between counting and nobeam because the HM has no way to
  diagnose nobeam
- In motorsec.c the pDrivInt->iErrorCount was not reset to 0 properly. Leading to death.
- Removed the stack smashing test flag for the time being.
This commit is contained in:
2014-05-21 09:58:23 +02:00
parent 325fc6f313
commit 4f5bcaeb5e
6 changed files with 16 additions and 2 deletions

View File

@ -247,6 +247,7 @@ int ANETconnect(char *name, int iPort)
status = connect(socke, (struct sockaddr *) &addresse,
sizeof(struct sockaddr_in));
if (status < 0) {
close(socke);
anetLog(ANETERROR, "Failed to open socket to %s:%d", name, iPort);
return ANETOPENFAIL;
}