]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
add a trap for FD < 0 in commSetSelect()
authorwessels <>
Wed, 19 Feb 1997 07:06:14 +0000 (07:06 +0000)
committerwessels <>
Wed, 19 Feb 1997 07:06:14 +0000 (07:06 +0000)
src/comm.cc

index 32d52df85066c8971918a7fa40f4446d17f5a930..2feba8d8ccd3aeed965a392bb44583718c158f45 100644 (file)
@@ -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;