]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3159: delay pools --disable-auth compile problems
authorAlex Rousskov <rousskov@measurement-factory.com>
Wed, 3 Aug 2011 20:44:38 +0000 (14:44 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Wed, 3 Aug 2011 20:44:38 +0000 (14:44 -0600)
Also adds test-suite scan for --disable-auth issues.

Cherry-picked from trunk (r11472).

src/CompositePoolNode.h
src/DelayId.cc
src/DelayUser.cc
src/DelayUser.h
src/client_side_request.cc
src/delay_pools.cc

index 70c46dc59bf4a9425d3b33426340f044ceacc6cf..821e2b715e1861da2ce9f325b4d4a4e652b50dc0 100644 (file)
@@ -73,7 +73,9 @@ public:
         CompositeSelectionDetails() {}
 
         Ip::Address src_addr;
+#if USE_AUTH
         AuthUserRequest::Pointer user;
+#endif
         String tag;
     };
 
index dcfad8930bb81aff024ef0537adfaa2fde5ed9c4..3f47fd327df9ae63494b1794aa93d80d27847bba 100644 (file)
@@ -131,7 +131,9 @@ DelayId::DelayClient(ClientHttpRequest * http)
             DelayId result (pool + 1);
             CompositePoolNode::CompositeSelectionDetails details;
             details.src_addr = ch.src_addr;
+#if USE_AUTH
             details.user = r->auth_user_request;
+#endif
             details.tag = r->tag;
             result.compositePosition(DelayPools::delay_data[pool].theComposite()->id(details));
             return result;
index fbac8e5b3f1a751a3b0929141f3d1a95bcdb0a65..c36bbaa8f1bb33abc486662bc2bf642dc702f972 100644 (file)
@@ -37,7 +37,7 @@
 
 #include "config.h"
 
-#if USE_DELAY_POOLS
+#if USE_DELAY_POOLS && USE_AUTH
 #include "squid.h"
 #include "DelayUser.h"
 #include "auth/UserRequest.h"
@@ -235,4 +235,4 @@ DelayUser::Id::bytesIn(int qty)
     theBucket->theBucket.bytesIn(qty);
 }
 
-#endif
+#endif /* USE_DELAY_POOLS && USE_AUTH */
index a0816bdbfe9a616bd6ba086c35bd78f902bd5d80..0210e343fb1e9a3d93ecb91917e01923b74795fc 100644 (file)
@@ -36,7 +36,7 @@
 #ifndef DELAYUSER_H
 #define DELAYUSER_H
 
-#if USE_DELAY_POOLS
+#if USE_DELAY_POOLS && USE_AUTH
 
 #include "squid.h"
 #include "auth/Gadgets.h"
@@ -106,5 +106,5 @@ private:
     Splay<DelayUserBucket::Pointer> buckets;
 };
 
-#endif /* USE_DELAY_POOLS */
+#endif /* USE_DELAY_POOLS && USE_AUTH */
 #endif /* DELAYUSER_H */
index 1115dd6ab3649d7b1dbcdf87805d81fefab4b935..d51702a1da55cac1779ebb4d2b7394019f3e92ca 100644 (file)
@@ -1630,8 +1630,12 @@ ClientHttpRequest::handleAdaptationFailure(int errDetail, bool bypassable)
     repContext->setReplyToError(ERR_ICAP_FAILURE, HTTP_INTERNAL_SERVER_ERROR,
                                 request->method, NULL,
                                 (c != NULL ? c->peer : noAddr), request, NULL,
+#if USE_AUTH
                                 (c != NULL && c->auth_user_request != NULL ?
                                  c->auth_user_request : request->auth_user_request));
+#else
+                                NULL);
+#endif
 
     request->detailError(ERR_ICAP_FAILURE, errDetail);
 
index 566291e8168b2c4ec5e7203544bccc2eeae54965..55fee1e3471fb9d6528538c50cadd7cead1bc165 100644 (file)
@@ -340,7 +340,9 @@ CommonPool::Factory(unsigned char _class, CompositePoolNode::Pointer& compositeC
             temp->push_back (new Aggregate);
             temp->push_back (new ClassCNetPool);
             temp->push_back (new ClassCHostPool);
+#if USE_AUTH
             temp->push_back (new DelayUser);
+#endif
         }
         break;