]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix build with eCAP but without ICAP support.
authorAlex Rousskov <rousskov@measurement-factory.com>
Sat, 15 Oct 2016 04:20:24 +0000 (17:20 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 15 Oct 2016 04:20:24 +0000 (17:20 +1300)
That is, when ./configured with --enable-ecap --disable-icap-client.

AccessLogEntry::icap requires ICAP_CLIENT, not just USE_ADAPTATION.

src/format/Format.cc

index 4540a47c4f738bc124c3966df185f25b07fd5fbe..3ca3a92be66b186bfd68eb2c80286c6167fca235 100644 (file)
@@ -318,7 +318,7 @@ static const HttpMsg *
 actualReplyHeader(const AccessLogEntry::Pointer &al)
 {
     const HttpMsg *msg = al->reply;
-#if USE_ADAPTATION
+#if ICAP_CLIENT
     // al->icap.reqMethod is methodNone in access.log context
     if (!msg && al->icap.reqMethod == Adaptation::methodReqmod)
         msg = al->adapted_request;
@@ -331,7 +331,7 @@ actualReplyHeader(const AccessLogEntry::Pointer &al)
 static const HttpMsg *
 actualRequestHeader(const AccessLogEntry::Pointer &al)
 {
-#if USE_ADAPTATION
+#if ICAP_CLIENT
     // al->icap.reqMethod is methodNone in access.log context
     if (al->icap.reqMethod == Adaptation::methodRespmod) {
         // XXX: for now AccessLogEntry lacks virgin response headers
@@ -819,7 +819,7 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS
         break;
 
         case LFT_REQUEST_ALL_HEADERS:
-#if USE_ADAPTATION
+#if ICAP_CLIENT
             if (al->icap.reqMethod == Adaptation::methodRespmod) {
                 // XXX: since AccessLogEntry::Headers lacks virgin response
                 // headers, do nothing for now
@@ -843,7 +843,7 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS
 
         case LFT_REPLY_ALL_HEADERS:
             out = al->headers.reply;
-#if USE_ADAPTATION
+#if ICAP_CLIENT
             if (!out && al->icap.reqMethod == Adaptation::methodReqmod)
                 out = al->headers.adapted_request;
 #endif