From: wessels <> Date: Wed, 19 Feb 1997 07:06:14 +0000 (+0000) Subject: add a trap for FD < 0 in commSetSelect() X-Git-Tag: SQUID_3_0_PRE1~5111 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a78a381991abb273b738160eb505abc1f0df7cf;p=thirdparty%2Fsquid.git add a trap for FD < 0 in commSetSelect() --- diff --git a/src/comm.cc b/src/comm.cc index 32d52df850..2feba8d8cc 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1,6 +1,6 @@ /* - * $Id: comm.cc,v 1.135 1997/02/07 04:57:12 wessels Exp $ + * $Id: comm.cc,v 1.136 1997/02/19 00:06:14 wessels Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -1053,6 +1053,10 @@ comm_select(time_t sec) void commSetSelect(int fd, unsigned int type, PF handler, void *client_data, time_t timeout) { + if (fd < 0) { + debug_trap("commSetSelect: FD < 0"); + return; + } if (type & COMM_SELECT_TIMEOUT) { fd_table[fd].timeout_time = (getCurrentTime() + timeout); fd_table[fd].timeout_delta = timeout;