Patch for Unix Stable 1.5 tftpservermtV1.53
Brought to you by:
achaldhir
CHANGES MADE:
1. Fixed a bug where the return value of the function select() was not checked. This becomes an issue under load, as the FD_SETSIZE parameter is hard-coded to 1024 in the kernel, so when this limit is reached the select() will fail. I would suggest that the best solution to this issue would be to remove the select() and FD_ISSET calls, replacing them with epoll()
2. The function logMess() used the inet_ntoa() function which is not thread safe. This has been replaced with inet_ntop.
3. In the init() function, I changed the opening of the log file to append, as the original over-wrote the log on start-up.
4. Also added comments throughout to make the code more readable.
patch file for tftpserver.cpp - Unix Stable 1.5 - tftpservermtV1.53