--------------------- PatchSet 1852 Date: 2005/09/19 20:51:42 Author: dwsquid Branch: squid3-icap Tag: (none) Log: astyle Members: src/MemBuf.cc:1.6.8.6->1.6.8.7 src/client_side_request.cc:1.34.4.5->1.34.4.6 Index: squid3/src/MemBuf.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/MemBuf.cc,v retrieving revision 1.6.8.6 retrieving revision 1.6.8.7 diff -u -r1.6.8.6 -r1.6.8.7 --- squid3/src/MemBuf.cc 18 Sep 2005 03:42:58 -0000 1.6.8.6 +++ squid3/src/MemBuf.cc 19 Sep 2005 20:51:42 -0000 1.6.8.7 @@ -1,6 +1,6 @@ /* - * $Id: MemBuf.cc,v 1.6.8.6 2005/09/18 03:42:58 dwsquid Exp $ + * $Id: MemBuf.cc,v 1.6.8.7 2005/09/19 20:51:42 dwsquid Exp $ * * DEBUG: section 59 auto-growing Memory Buffer with printf * AUTHOR: Alex Rousskov @@ -182,6 +182,7 @@ MemBuf::isNull() { //assert(valid); + if (!buf && !max_capacity && !capacity && !size) return 1; /* is null (not initialized) */ Index: squid3/src/client_side_request.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/client_side_request.cc,v retrieving revision 1.34.4.5 retrieving revision 1.34.4.6 diff -u -r1.34.4.5 -r1.34.4.6 --- squid3/src/client_side_request.cc 19 Sep 2005 20:48:33 -0000 1.34.4.5 +++ squid3/src/client_side_request.cc 19 Sep 2005 20:51:42 -0000 1.34.4.6 @@ -1,6 +1,6 @@ /* - * $Id: client_side_request.cc,v 1.34.4.5 2005/09/19 20:48:33 dwsquid Exp $ + * $Id: client_side_request.cc,v 1.34.4.6 2005/09/19 20:51:42 dwsquid Exp $ * * DEBUG: section 85 Client-side Request Routines * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c) @@ -105,8 +105,10 @@ delete acl_checklist; #if ICAP_CLIENT + if (icap) - delete icap; + delete icap; + #endif } @@ -1031,17 +1033,19 @@ ClientRequestContext::abortAdapting() { debug(33,3)("ClientRequestContext::abortAdapting() called\n"); + if ((NULL == http->storeEntry()) || http->storeEntry()->isEmpty()) { debug(33,1)("WARNING: ICAP REQMOD callout failed, proceeding with original request\n"); delete icap; icap = NULL; checkNoCache(); #if ICAP_HARD_ERROR + clientStreamNode *node = (clientStreamNode *)http->client_stream.tail->prev->data; clientReplyContext *repContext = dynamic_cast(node->data.getRaw()); assert (repContext); - // Note if this code is ever used, clientBuildError() should be modified to - // accept an errno arg + // Note if this code is ever used, clientBuildError() should be modified to + // accept an errno arg repContext->setReplyToError(ERR_ICAP_FAILURE, HTTP_INTERNAL_SERVER_ERROR, http->request->method, NULL, http->getConn().getRaw() != NULL ? &http->getConn()->peer.sin_addr : &no_addr, http->request, @@ -1051,8 +1055,10 @@ node = (clientStreamNode *)http->client_stream.tail->data; clientStreamRead(node, http, node->readBuffer); #endif - return; + + return; } + debug(0,0)("write me at %s:%d\n", __FILE__,__LINE__); }