Sun Jul 30 23:06:50 ART 2006 Alberto Bertogli tagged 0.17 Sun Jul 30 23:05:41 ART 2006 Alberto Bertogli * Remove the "prerelease" script as it's no longer needed. Sun Jul 30 22:44:45 ART 2006 Alberto Bertogli * Use unsigned long for the thread ids to avoid a warning. Sun Jul 30 21:04:23 ART 2006 Alberto Bertogli * Make libold compile in Windows. Change libold to build natively under Windows, at least with the mingw compiler. Thanks a lot to Ron Burkey (rburkey2005@earthlink.net) who provided the code and tested the patch. Sat Jul 15 12:35:37 ART 2006 Alberto Bertogli * Clarify licensing terms. Sat Jul 15 04:52:26 ART 2006 Alberto Bertogli * Don't force the fd to be active in net_wakeup() net_wakeup() forces the file descriptor it's waking up to be active, by setting active_fd[fd] = 1. This can cause the following race: * Lock L is held by client A * Client B is connected and waiting for lock L to become available * Client B decides to disconnect, and closes the socket * This triggers net_close() * At this point, client A releases lock L, triggering net_wakeup() Now, here's how it could go: net_close() net_wakeup() active_fd[fd] = 0 active_fd[fd] = 1 net_send_cmd[fd] returns OK because the socket is not closed yet close() And that leaves fd closed, but active_fd[fd] = 1, which will cause the select() loop to hang up indefinitely, because it gets a "Bad file descriptor" error (due to a fd on the read set being closed), which causes it to rebuild the read set and try again. But nothing will never remove that fd from the set, because nothing will set active_fd[fd] = 0. The fix is not setting active_fd[fd] = 1 in net_wakeup(), it has nothing to do there in the first place. Besides, check if the fd is active before calling net_send_cmd(), because we know it's going to fail. Thanks to Lloyd C. Cha for the report and testing. Sat Jul 15 04:50:42 ART 2006 Alberto Bertogli * Don't cleanup after net_send_cmd(). net_send_cmd() calls clean_buffer() and net_close() when it gets a write error, so there's no need to do cleanup when it fails. But net_wakeup() does just that: when net_send_cmd() fails, it also calls clean_buffer() and net_close(). This patch fixes that by removing both calls. Sat Jul 15 04:17:33 ART 2006 Alberto Bertogli * Compile with -fPIC. Sun Dec 4 19:12:47 ART 2005 Alberto Bertogli tagged 0.16