]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
change comm_add_close_handler assertion. It must be allowed to have
authorwessels <>
Wed, 10 Jun 1998 11:47:09 +0000 (11:47 +0000)
committerwessels <>
Wed, 10 Jun 1998 11:47:09 +0000 (11:47 +0000)
the same close handler on the same FD.  Now abort if both the handler
and the callback data are the same.

src/comm.cc

index 84e718e4477b74528718cdc919169283d86e99ca..52190997096d54dedf46133d4bd621df83c799fe 100644 (file)
@@ -1,7 +1,7 @@
 
 
 /*
- * $Id: comm.cc,v 1.270 1998/06/09 23:34:00 wessels Exp $
+ * $Id: comm.cc,v 1.271 1998/06/10 05:47:09 wessels Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -1094,7 +1094,7 @@ comm_add_close_handler(int fd, PF * handler, void *data)
     debug(5, 5) ("comm_add_close_handler: FD %d, handler=%p, data=%p\n",
        fd, handler, data);
     for (c = fd_table[fd].close_handler; c; c=c->next)
-       assert(c->handler != handler && c->data != data);
+       assert(c->handler != handler || c->data != data);
     new->handler = handler;
     new->data = data;
     new->next = fd_table[fd].close_handler;