From: wessels <> Date: Sun, 29 Mar 1998 01:37:05 +0000 (+0000) Subject: protect htcp features with USE_HTCP X-Git-Tag: SQUID_3_0_PRE1~3719 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dc9d133b1cbe35802fa47aa8ece5666b0931891e;p=thirdparty%2Fsquid.git protect htcp features with USE_HTCP --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 9c071ab574..8a3fdc3c8c 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,6 +1,6 @@ /* - * $Id: cache_cf.cc,v 1.266 1998/03/28 06:26:42 wessels Exp $ + * $Id: cache_cf.cc,v 1.267 1998/03/28 18:37:05 wessels Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -698,8 +698,10 @@ parse_peer(peer ** head) EBIT_SET(p->options, NEIGHBOR_DEFAULT_PARENT); } else if (!strncasecmp(token, "round-robin", 11)) { EBIT_SET(p->options, NEIGHBOR_ROUNDROBIN); +#if USE_HTCP } else if (!strncasecmp(token, "htcp", 4)) { EBIT_SET(p->options, NEIGHBOR_HTCP); +#endif } else { debug(3, 0) ("parse_peer: token='%s'\n", token); self_destruct(); diff --git a/src/enums.h b/src/enums.h index bb77b03d83..e1e16cfed3 100644 --- a/src/enums.h +++ b/src/enums.h @@ -438,7 +438,9 @@ enum { NEIGHBOR_ROUNDROBIN, NEIGHBOR_MCAST_RESPONDER, NEIGHBOR_CLOSEST_ONLY, +#if USE_HTCP NEIGHBOR_HTCP +#endif }; typedef enum { diff --git a/src/neighbors.cc b/src/neighbors.cc index dee2775855..5f3f9e5ffc 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -1,6 +1,6 @@ /* - * $Id: neighbors.cc,v 1.185 1998/03/28 06:26:44 wessels Exp $ + * $Id: neighbors.cc,v 1.186 1998/03/28 18:37:07 wessels Exp $ * * DEBUG: section 15 Neighbor Routines * AUTHOR: Harvest Derived @@ -442,10 +442,13 @@ neighborsUdpPing(request_t * request, debug(15, 3) ("neighborsUdpPing: key = '%s'\n", storeKeyText(entry->key)); debug(15, 3) ("neighborsUdpPing: reqnum = %d\n", reqnum); +#if USE_HTCP if (EBIT_TEST(p->options, NEIGHBOR_HTCP)) { debug(15, 0)("neighborsUdpPing: sending HTCP query\n"); htcpQuery(entry, request, p); - } else if (p->icp_port == echo_port) { + } else +#endif + if (p->icp_port == echo_port) { debug(15, 4) ("neighborsUdpPing: Looks like a dumb cache, send DECHO ping\n"); echo_hdr.reqnum = reqnum; query = icpCreateMessage(ICP_DECHO, 0, url, reqnum, 0); @@ -1005,8 +1008,10 @@ dump_peer_options(StoreEntry * sentry, peer * p) storeAppendPrintf(sentry, " multicast-responder"); if (EBIT_TEST(p->options, NEIGHBOR_CLOSEST_ONLY)) storeAppendPrintf(sentry, " closest-only"); +#if USE_HTCP if (EBIT_TEST(p->options, NEIGHBOR_HTCP)) storeAppendPrintf(sentry, " htcp"); +#endif if (p->mcast.ttl > 0) storeAppendPrintf(sentry, " ttl=%d", p->mcast.ttl); storeAppendPrintf(sentry, "\n");