#1 Patch for Unix Stable 1.5 tftpservermtV1.53

open
nobody
None
5
2008-09-29
2008-09-29
Sabrina Brown
No

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.

Discussion

  • Sabrina Brown
    Sabrina Brown
    2008-09-29

    patch file for tftpserver.cpp - Unix Stable 1.5 - tftpservermtV1.53