From: wessels <> Date: Wed, 10 Jun 1998 11:47:09 +0000 (+0000) Subject: change comm_add_close_handler assertion. It must be allowed to have X-Git-Tag: SQUID_3_0_PRE1~3145 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aeca2a092d2fae38ec6fdc13480f86fa9157406e;p=thirdparty%2Fsquid.git change comm_add_close_handler assertion. It must be allowed to have the same close handler on the same FD. Now abort if both the handler and the callback data are the same. --- diff --git a/src/comm.cc b/src/comm.cc index 84e718e447..5219099709 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -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;