X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/d0e1e8ee7804ccdc82e2355878b23683d8931e08..f71e18eee589ba32d142c73fdb206c8541c85568:/libcharybdis/commio.c diff --git a/libcharybdis/commio.c b/libcharybdis/commio.c index 49cab12..2985fc2 100644 --- a/libcharybdis/commio.c +++ b/libcharybdis/commio.c @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: commio.c 3235 2007-03-05 17:31:35Z nenolod $ + * $Id: commio.c 3247 2007-03-05 18:42:24Z nenolod $ */ #include "libcharybdis.h" @@ -324,7 +324,7 @@ comm_checktimeouts(void *notused) int i; dlink_node *n, *n2; - for (i = 0; i <= FD_HASH_SIZE; i) + for (i = 0; i <= FD_HASH_SIZE; i++) { bucket = &fd_table[i]; @@ -740,7 +740,7 @@ fdlist_update_biggest(int fd, int opening) * re-opening it */ s_assert(!opening); - while (highest_fd >= 0 && comm_locate_fd(fd)->flags.open) /* XXX */ + while (highest_fd >= 0 && comm_locate_fd(fd) != NULL) highest_fd--; } @@ -801,6 +801,7 @@ comm_close(int fd) } comm_setselect(F->fd, FDLIST_NONE, COMM_SELECT_WRITE | COMM_SELECT_READ, NULL, NULL, 0); comm_setflush(F->fd, 0, NULL, NULL); + F->timeout = 0; if (F->dns_query != NULL) { @@ -814,7 +815,6 @@ comm_close(int fd) number_fd--; comm_remove_fd(fd); - F->timeout = 0; /* Unlike squid, we're actually closing the FD here! -- adrian */ close(fd); }