]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Remove the --disable-carp option, keeping the CARP code always compiled in
authorHenrik Nordstrom <henrik@henriknordstrom.net>
Fri, 11 Jul 2008 19:32:10 +0000 (21:32 +0200)
committerHenrik Nordstrom <henrik@henriknordstrom.net>
Fri, 11 Jul 2008 19:32:10 +0000 (21:32 +0200)
this configure option was a relic from the time when CARP was very intrusive,
requiring --enable-carp to be compiled and then chainging parent relations.
The current CARP implementaiton is very non-intrusive and by default enabled
(but not active unless used in squid.conf). There isn't really any good reason
to why one should use --disable-carp today.

configure.in
squid3.dox
src/cache_cf.cc
src/carp.cc
src/enums.h
src/main.cc
src/peer_select.cc
src/protos.h
src/structs.h

index 929e0b1554f8000a161715a23d759cd821ec7f9e..b8b8f64f5981e52ad3f89489202219d2448d5858 100755 (executable)
@@ -356,18 +356,6 @@ AC_ARG_ENABLE(xmalloc-statistics,
   fi
 ])
 
-use_carp=1
-AC_ARG_ENABLE(carp,
-[  --disable-carp          Disable CARP support],
-[ if test "$enableval" = "no" ; then
-    echo "CARP disabled"
-    use_carp=0
-  fi
-])      
-if test $use_carp = 1; then
-    AC_DEFINE(USE_CARP, 1, [Cache Array Routing Protocol])
-fi
-
 AC_ARG_ENABLE(async-io,
 [  --enable-async-io[=N_THREADS]
                           Shorthand for
index d2b89f7c43d06f422653eac51a3b8ec8779171ff..4d6b424916def4b47eb0227d0b220239dda5e063 100644 (file)
@@ -1018,7 +1018,6 @@ PREDEFINED             = \
                        USE_ARP_ACL \
                        USE_ASYNC_IO \
                        USE_CACHE_DIGESTS \
-                       USE_CARP \
                        USE_CLASSFUL \
                        USE_DLMALLOC \
                        USE_DNSSERVERS \
index f845cf2f2c1ca12a4f191bb90a3566055ddb1baa..2f03e7425fcac2706e4437994fc577f908bc701a 100644 (file)
@@ -1733,7 +1733,6 @@ parse_peer(peer ** head)
 
         } else if (!strcasecmp(token, "no-netdb-exchange")) {
             p->options.no_netdb_exchange = 1;
-#if USE_CARP
 
         } else if (!strcasecmp(token, "carp")) {
             if (p->type != PEER_PARENT)
@@ -1741,7 +1740,6 @@ parse_peer(peer ** head)
 
             p->options.carp = 1;
 
-#endif
 #if DELAY_POOLS
 
         } else if (!strcasecmp(token, "no-delay")) {
index 9c7fa65324a297ac9631c487c83f54c14d0e4a80..ad66828fb00a6f29449da6ace07ad0fedf12ca64 100644 (file)
@@ -38,8 +38,6 @@
 #include "CacheManager.h"
 #include "Store.h"
 
-#if USE_CARP
-
 #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
 
 static int n_carp_peers = 0;
@@ -227,5 +225,3 @@ carpCachemgr(StoreEntry * sentry)
                           sumfetches ? (double) p->stats.fetches / sumfetches : -1.0);
     }
 }
-
-#endif
index 24fdd08dabb3f83b6a8d2644aa4effff22fef6d5..8d590dceb692095fa86365cb9ab0005f0e0d5580 100644 (file)
@@ -173,9 +173,7 @@ typedef enum {
     CD_PARENT_HIT,
     CD_SIBLING_HIT,
 #endif
-#if USE_CARP
     CARP,
-#endif
     ANY_OLD_PARENT,
     HIER_MAX
 } hier_code;
index 0a99057c61c940301c7116afbc19836d20f25488..c27b6a73853a0a7ce02abed7253956b06d66c327 100644 (file)
@@ -626,10 +626,8 @@ serverConnectionsOpen(void)
     asnInit();
     ACL::Initialize();
     peerSelectInit();
-#if USE_CARP
 
     carpInit();
-#endif
 }
 
 void
index cc9cc221422b4c540fcea335658095bfcbce602f..f48a7c082a355ee1399e88ee1ad804cbe5eac27c 100644 (file)
@@ -63,9 +63,7 @@ const char *hier_strings[] =
         "CD_PARENT_HIT",
         "CD_SIBLING_HIT",
 #endif
-#if USE_CARP
         "CARP",
-#endif
         "ANY_PARENT",
         "INVALID CODE"
     };
@@ -505,12 +503,8 @@ peerGetSomeParent(ps_state * ps)
 
     if ((p = getDefaultParent(request))) {
         code = DEFAULT_PARENT;
-#if USE_CARP
-
     } else if ((p = carpSelectParent(request))) {
         code = CARP;
-#endif
-
     } else if ((p = getRoundRobinParent(request))) {
         code = ROUNDROBIN_PARENT;
     } else if ((p = getWeightedRoundRobinParent(request))) {
index f91473f46d0a2ea6af872b929df72ddff9603c65..741556041f52437f3371017d22aa90df8fb322be 100644 (file)
@@ -728,11 +728,9 @@ SQUIDCEXTERN char *internalRemoteUri(const char *, u_short, const char *, const
 SQUIDCEXTERN const char *internalHostname(void);
 SQUIDCEXTERN int internalHostnameIs(const char *);
 
-#if USE_CARP
 SQUIDCEXTERN void carpInit(void);
 extern void carpRegisterWithCacheManager(CacheManager & manager);
 SQUIDCEXTERN peer *carpSelectParent(HttpRequest *);
-#endif
 
 
 #if USE_LEAKFINDER
index 97b055e5d1300155b70a6e4edcbd708a4a132edd..3a4b22321c07222c742baab1558aef42e813c7a5 100755 (executable)
@@ -929,9 +929,7 @@ struct peer
         unsigned int no_delay:1;
 #endif
         unsigned int allow_miss:1;
-#if USE_CARP
         unsigned int carp:1;
-#endif
         unsigned int originserver:1;
     } options;
 
@@ -966,7 +964,6 @@ struct peer
     int rr_lastcount;
     peer *next;
     int test_fd;
-#if USE_CARP
 
     struct
     {
@@ -974,7 +971,6 @@ struct peer
         double load_multiplier;
         double load_factor;    /* normalized weight value */
     } carp;
-#endif
 
     char *login;               /* Proxy authorization */
     time_t connect_timeout;