--------------------- PatchSet 7186 Date: 2005/12/01 00:37:09 Author: dwsquid Branch: icap-2_5 Tag: (none) Log: After more testing, the assertions in clientReadRequest are a bad idea since they can be triggered in the default-compiled code. This changes the assertion to simply close the FD and log a warning. Members: src/client_side.c:1.47.2.28.2.38->1.47.2.28.2.39 Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.47.2.28.2.38 retrieving revision 1.47.2.28.2.39 diff -u -r1.47.2.28.2.38 -r1.47.2.28.2.39 --- squid/src/client_side.c 30 Nov 2005 23:39:53 -0000 1.47.2.28.2.38 +++ squid/src/client_side.c 1 Dec 2005 00:37:09 -0000 1.47.2.28.2.39 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.47.2.28.2.38 2005/11/30 23:39:53 dwsquid Exp $ + * $Id: client_side.c,v 1.47.2.28.2.39 2005/12/01 00:37:09 dwsquid Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -3017,14 +3017,17 @@ } #if HS_FEAT_ICAP /* - * These assertions exist because ICAP doesn't always work well + * This check exists because ICAP doesn't always work well * with persistent (reused) connections. One version of the * REQMOD code creates a fake ConnStateData, which doesn't have * an in.buf. We want to make sure that the fake ConnStateData * doesn't get used here. */ - assert(conn->in.buf); - assert(len); + if (NULL == conn->in.buf) { + debug(33, 1) ("clientReadRequest: FD %d aborted; conn->in.buf is NULL\n", fd); + comm_close(fd); + return; + } #endif statCounter.syscalls.sock.reads++; size = FD_READ_METHOD(fd, conn->in.buf + conn->in.offset, len);