--------------------- PatchSet 1928 Date: 2005/10/03 17:52:01 Author: dwsquid Branch: squid3-icap Tag: (none) Log: Fix the service-not-found case in ClientRequestContext::icapAclCheckDone() and add some comments. Members: src/client_side_request.cc:1.34.4.12->1.34.4.13 Index: squid3/src/client_side_request.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/client_side_request.cc,v retrieving revision 1.34.4.12 retrieving revision 1.34.4.13 diff -u -r1.34.4.12 -r1.34.4.13 --- squid3/src/client_side_request.cc 3 Oct 2005 16:24:41 -0000 1.34.4.12 +++ squid3/src/client_side_request.cc 3 Oct 2005 17:52:01 -0000 1.34.4.13 @@ -1,6 +1,6 @@ /* - * $Id: client_side_request.cc,v 1.34.4.12 2005/10/03 16:24:41 dwsquid Exp $ + * $Id: client_side_request.cc,v 1.34.4.13 2005/10/03 17:52:01 dwsquid Exp $ * * DEBUG: section 85 Client-side Request Routines * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c) @@ -477,22 +477,38 @@ icapAclCheckDoneWrapper(ICAPServiceRep::Pointer service, void *data) { ClientRequestContext *calloutContext = (ClientRequestContext *)data; + if (!calloutContext->httpStateIsValid()) return; + calloutContext->icapAclCheckDone(service); } void ClientRequestContext::icapAclCheckDone(ICAPServiceRep::Pointer service) { + /* + * No matching ICAP service in the config file + */ + if (service == NULL) { - assert(false); + http->doCallouts(); return; } + /* + * Setup ICAP state and such. If successful, just return. + * We'll get back to doCallouts() after REQMOD is done. + */ if (0 == http->doIcap(service)) return; + /* + * If doIcap() fails, then we have to either return an error + * to the user, or keep going without ICAP. + */ + fatal("Fix this case in ClientRequestContext::icapAclCheckDone()"); + http->doCallouts(); }