From: wessels <> Date: Sun, 4 Dec 2005 01:00:28 +0000 (+0000) Subject: Forgot to check the value of 'icap_enable' (TheICAPConfig.onoff) X-Git-Tag: SQUID_3_0_PRE4~467 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ab7ac359cc18e0fa69c9fe0af937701ec44aa8c8;p=thirdparty%2Fsquid.git Forgot to check the value of 'icap_enable' (TheICAPConfig.onoff) when ICAP code was compiled in, but should not be called. --- diff --git a/src/client_side_request.cc b/src/client_side_request.cc index d70f38e21b..4ef3d78247 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side_request.cc,v 1.52 2005/11/21 23:53:37 wessels Exp $ + * $Id: client_side_request.cc,v 1.53 2005/12/03 18:00:28 wessels Exp $ * * DEBUG: section 85 Client-side Request Routines * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c) @@ -60,6 +60,7 @@ #include "ICAP/ICAPElements.h" #include "ICAP/ICAPConfig.h" static void icapAclCheckDoneWrapper(ICAPServiceRep::Pointer service, void *data); +extern ICAPConfig TheICAPConfig; #endif #if LINGERING_CLOSE @@ -1039,7 +1040,7 @@ ClientHttpRequest::doCallouts() } #if ICAP_CLIENT - if (!calloutContext->icap_acl_check_done) { + if (TheICAPConfig.onoff && !calloutContext->icap_acl_check_done) { calloutContext->icap_acl_check_done = 1; calloutContext->icapAccessCheck(); return; diff --git a/src/http.cc b/src/http.cc index 3e072219bd..e1ca8e7192 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.468 2005/11/24 00:54:15 wessels Exp $ + * $Id: http.cc,v 1.469 2005/12/03 18:00:28 wessels Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -55,6 +55,7 @@ #if ICAP_CLIENT #include "ICAP/ICAPClientRespmodPrecache.h" #include "ICAP/ICAPConfig.h" +extern ICAPConfig TheICAPConfig; #endif CBDATA_CLASS_INIT(HttpStateData); @@ -755,7 +756,7 @@ HttpStateData::processReplyHeader() #if ICAP_CLIENT - { + if (TheICAPConfig.onoff) { ICAPAccessCheck *icap_access_check = new ICAPAccessCheck(ICAP::methodRespmod, ICAP::pointPreCache, request, reply, icapAclCheckDoneWrapper, this); @@ -764,6 +765,7 @@ HttpStateData::processReplyHeader() ctx_exit(ctx); return; } + #endif storeEntryReplaceObject(entry, reply);