diff -u -r -N squid-3.0.STABLE18/bootstrap.sh squid-3.0.STABLE19/bootstrap.sh --- squid-3.0.STABLE18/bootstrap.sh 2009-08-04 23:57:34.000000000 +1200 +++ squid-3.0.STABLE19/bootstrap.sh 2009-09-06 23:29:24.000000000 +1200 @@ -16,7 +16,30 @@ eval $2 --version 2>/dev/null | grep -i "$1.*$3" >/dev/null } -find_version() +show_version() +{ + tool=$1 + found="NOT_FOUND" + shift + versions="$*" + for version in $versions; do + for variant in "" "-${version}" "`echo $version | sed -e 's/\.//g'`"; do + if check_version $tool ${tool}${variant} $version; then + found="${version}" + break + fi + done + if [ "x$found" != "xNOT_FOUND" ]; then + break + fi + done + if [ "x$found" = "xNOT_FOUND" ]; then + found="??" + fi + echo $found +} + +find_variant() { tool=$1 found="NOT_FOUND" @@ -53,16 +76,21 @@ } # Adjust paths of required autool packages -amver=`find_version automake ${amversions}` -acver=`find_version autoconf ${acversions}` -ltver=`find_version libtool ${ltversions}` +amver=`find_variant automake ${amversions}` +acver=`find_variant autoconf ${acversions}` +ltver=`find_variant libtool ${ltversions}` + +# Produce debug output about what version actually found. +amversion=`show_version automake ${amversions}` +acversion=`show_version autoconf ${acversions}` +ltversion=`show_version libtool ${ltversions}` # Set environment variable to tell automake which autoconf to use. AUTOCONF="autoconf${acver}" ; export AUTOCONF -echo "automake : $amver" -echo "autoconfg: $acver" -echo "libtool : $ltver" +echo "automake ($amversion) : automake$amver" +echo "autoconf ($acversion) : autoconf$acver" +echo "libtool ($ltversion) : libtool$ltver" for dir in \ "" \ diff -u -r -N squid-3.0.STABLE18/ChangeLog squid-3.0.STABLE19/ChangeLog --- squid-3.0.STABLE18/ChangeLog 2009-08-04 23:57:34.000000000 +1200 +++ squid-3.0.STABLE19/ChangeLog 2009-09-06 23:29:24.000000000 +1200 @@ -1,3 +1,16 @@ +Changes to squid-3.0.STABLE19 (06 Sep 2009): + + - Bug 2745: Invalid Response error on small reads + - Bug 2739: DNS resolver option ndots can't be parsed from resolv.conf + - Bug 2734: some compile errors on Solaris + - Bug 2648: stateful helpers stuck in reserved if client disconnects while helper busy + - Bug 2541: Hang in 100% CPU loop while extacting header details using a delimiter other than comma + - Bug 2362: Remove support for deferred state in stateful helpers + - Add 0.0.0.0 as a to_localhost address + - Docs: Improve chroot directive documentation slightly + - Fixup libxml2 include magics, was failing when a configure cache was used + - ... and some minor testing improvements. + Changes to squid-3.0.STABLE18 (04 Aug 2009): - Bug 2728: regression: assertion failed: !eof diff -u -r -N squid-3.0.STABLE18/configure squid-3.0.STABLE19/configure --- squid-3.0.STABLE18/configure 2009-08-04 23:57:50.000000000 +1200 +++ squid-3.0.STABLE19/configure 2009-09-06 23:29:39.000000000 +1200 @@ -1,7 +1,7 @@ #! /bin/sh # From configure.in Revision. # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.62 for Squid Web Proxy 3.0.STABLE18. +# Generated by GNU Autoconf 2.62 for Squid Web Proxy 3.0.STABLE19. # # Report bugs to . # @@ -751,8 +751,8 @@ # Identity of this package. PACKAGE_NAME='Squid Web Proxy' PACKAGE_TARNAME='squid' -PACKAGE_VERSION='3.0.STABLE18' -PACKAGE_STRING='Squid Web Proxy 3.0.STABLE18' +PACKAGE_VERSION='3.0.STABLE19' +PACKAGE_STRING='Squid Web Proxy 3.0.STABLE19' PACKAGE_BUGREPORT='http://www.squid-cache.org/bugs/' ac_unique_file="src/main.cc" @@ -1664,7 +1664,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Squid Web Proxy 3.0.STABLE18 to adapt to many kinds of systems. +\`configure' configures Squid Web Proxy 3.0.STABLE19 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1734,7 +1734,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Squid Web Proxy 3.0.STABLE18:";; + short | recursive ) echo "Configuration of Squid Web Proxy 3.0.STABLE19:";; esac cat <<\_ACEOF @@ -2046,7 +2046,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Squid Web Proxy configure 3.0.STABLE18 +Squid Web Proxy configure 3.0.STABLE19 generated by GNU Autoconf 2.62 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -2060,7 +2060,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Squid Web Proxy $as_me 3.0.STABLE18, which was +It was created by Squid Web Proxy $as_me 3.0.STABLE19, which was generated by GNU Autoconf 2.62. Invocation command line was $ $0 $@ @@ -2778,7 +2778,7 @@ # Define the identity of the package. PACKAGE='squid' - VERSION='3.0.STABLE18' + VERSION='3.0.STABLE19' cat >>confdefs.h <<_ACEOF @@ -26087,20 +26087,20 @@ cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - -else - - CPPFLAGS="$SAVED_CPPFLAGS" - + ac_cv_libxml2_include=yes fi done + CPPFLAGS="$SAVED_CPPFLAGS" fi done +if test "x$ac_cv_libxml2_include" = "xyes"; then + SQUID_CXXFLAGS="-I/usr/include/libxml2 $SQUID_CXXFLAGS" +fi { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } @@ -48084,7 +48084,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Squid Web Proxy $as_me 3.0.STABLE18, which was +This file was extended by Squid Web Proxy $as_me 3.0.STABLE19, which was generated by GNU Autoconf 2.62. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -48137,7 +48137,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -Squid Web Proxy config.status 3.0.STABLE18 +Squid Web Proxy config.status 3.0.STABLE19 configured by $0, generated by GNU Autoconf 2.62, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff -u -r -N squid-3.0.STABLE18/configure.in squid-3.0.STABLE19/configure.in --- squid-3.0.STABLE18/configure.in 2009-08-04 23:57:50.000000000 +1200 +++ squid-3.0.STABLE19/configure.in 2009-09-06 23:29:39.000000000 +1200 @@ -1,7 +1,7 @@ dnl Configuration input file for Squid dnl dnl -AC_INIT(Squid Web Proxy, 3.0.STABLE18, http://www.squid-cache.org/bugs/, squid) +AC_INIT(Squid Web Proxy, 3.0.STABLE19, http://www.squid-cache.org/bugs/, squid) AC_PREREQ(2.52) AM_CONFIG_HEADER(include/autoconf.h) AC_CONFIG_AUX_DIR(cfgaux) @@ -2059,10 +2059,12 @@ SAVED_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I/usr/include/libxml2 $CPPFLAGS" unset ac_cv_header_libxml_parser_h - AC_CHECK_HEADERS([libxml/parser.h], [], [ - CPPFLAGS="$SAVED_CPPFLAGS" - ]) + AC_CHECK_HEADERS([libxml/parser.h], [ac_cv_libxml2_include=yes], []) + CPPFLAGS="$SAVED_CPPFLAGS" ]) +if test "x$ac_cv_libxml2_include" = "xyes"; then + SQUID_CXXFLAGS="-I/usr/include/libxml2 $SQUID_CXXFLAGS" +fi AC_C_CONST AC_C_BIGENDIAN diff -u -r -N squid-3.0.STABLE18/include/version.h squid-3.0.STABLE19/include/version.h --- squid-3.0.STABLE18/include/version.h 2009-08-04 23:57:50.000000000 +1200 +++ squid-3.0.STABLE19/include/version.h 2009-09-06 23:29:39.000000000 +1200 @@ -9,5 +9,5 @@ */ #ifndef SQUID_RELEASE_TIME -#define SQUID_RELEASE_TIME 1249387052 +#define SQUID_RELEASE_TIME 1252236563 #endif diff -u -r -N squid-3.0.STABLE18/RELEASENOTES.html squid-3.0.STABLE19/RELEASENOTES.html --- squid-3.0.STABLE18/RELEASENOTES.html 2009-08-04 23:58:33.000000000 +1200 +++ squid-3.0.STABLE19/RELEASENOTES.html 2009-09-06 23:30:21.000000000 +1200 @@ -2,10 +2,10 @@ - Squid 3.0.STABLE18 release notes + Squid 3.0.STABLE19 release notes -

Squid 3.0.STABLE18 release notes

+

Squid 3.0.STABLE19 release notes

Squid Developers


@@ -60,7 +60,7 @@

1. Notice

-

The Squid Team are pleased to announce the release of Squid-3.0.STABLE18.

+

The Squid Team are pleased to announce the release of Squid-3.0.STABLE19.

This new release is available for download from http://www.squid-cache.org/Versions/v3/3.0/ or the mirrors.

diff -u -r -N squid-3.0.STABLE18/src/auth/negotiate/auth_negotiate.cc squid-3.0.STABLE19/src/auth/negotiate/auth_negotiate.cc --- squid-3.0.STABLE18/src/auth/negotiate/auth_negotiate.cc 2009-08-04 23:57:48.000000000 +1200 +++ squid-3.0.STABLE19/src/auth/negotiate/auth_negotiate.cc 2009-09-06 23:29:36.000000000 +1200 @@ -367,13 +367,12 @@ debugs(29, 5, "NegotiateUser::~NegotiateUser: doing nothing to clearNegotiate scheme data for '" << this << "'"); } -static stateful_helper_callback_t +static void authenticateNegotiateHandleReply(void *data, void *lastserver, char *reply) { authenticateStateData *r = static_cast(data); int valid; - stateful_helper_callback_t result = S_HELPER_UNKNOWN; char *blob, *arg = NULL; AuthUserRequest *auth_user_request; @@ -385,11 +384,10 @@ valid = cbdataReferenceValid(r->data); if (!valid) { - debugs(29, 1, "authenticateNegotiateHandleReply: invalid callback data. Releasing helper '" << lastserver << "'."); + debugs(29, 1, "authenticateNegotiateHandleReply: invalid callback data. helper '" << lastserver << "'."); cbdataReferenceDone(r->data); authenticateStateFree(r); - debugs(29, 9, "authenticateNegotiateHandleReply: telling stateful helper : " << S_HELPER_RELEASE); - return S_HELPER_RELEASE; + return; } if (!reply) { @@ -433,18 +431,16 @@ if (arg) *arg++ = '\0'; safe_free(negotiate_request->server_blob); - negotiate_request->request->flags.must_keepalive = 1; - if (negotiate_request->request->flags.proxy_keepalive) { - negotiate_request->server_blob = xstrdup(blob); - negotiate_request->auth_state = AUTHENTICATE_STATE_IN_PROGRESS; - auth_user_request->denyMessage("Authentication in progress"); - debugs(29, 4, "authenticateNegotiateHandleReply: Need to challenge the client with a server blob '" << blob << "'"); - result = S_HELPER_RESERVE; - } else { - negotiate_request->auth_state = AUTHENTICATE_STATE_FAILED; - auth_user_request->denyMessage("NTLM authentication requires a persistent connection"); - result = S_HELPER_RELEASE; - } + negotiate_request->request->flags.must_keepalive = 1; + if (negotiate_request->request->flags.proxy_keepalive) { + negotiate_request->server_blob = xstrdup(blob); + negotiate_request->auth_state = AUTHENTICATE_STATE_IN_PROGRESS; + auth_user_request->denyMessage("Authentication in progress"); + debugs(29, 4, "authenticateNegotiateHandleReply: Need to challenge the client with a server blob '" << blob << "'"); + } else { + negotiate_request->auth_state = AUTHENTICATE_STATE_FAILED; + auth_user_request->denyMessage("NTLM authentication requires a persistent connection"); + } } else if (strncasecmp(reply, "AF ", 3) == 0 && arg != NULL) { /* we're finished, release the helper */ @@ -463,8 +459,6 @@ negotiate_request->auth_state = AUTHENTICATE_STATE_DONE; - result = S_HELPER_RELEASE; - debugs(29, 4, "authenticateNegotiateHandleReply: Successfully validated user via Negotiate. Username '" << blob << "'"); /* connection is authenticated */ @@ -510,8 +504,6 @@ authenticateNegotiateReleaseServer(negotiate_request); - result = S_HELPER_RELEASE; - debugs(29, 4, "authenticateNegotiateHandleReply: Failed validating user via Negotiate. Error returned '" << blob << "'"); } else if (strncasecmp(reply, "BH ", 3) == 0) { /* TODO kick off a refresh process. This can occur after a YR or after @@ -523,7 +515,6 @@ negotiate_request->auth_state = AUTHENTICATE_STATE_FAILED; safe_free(negotiate_request->server_blob); authenticateNegotiateReleaseServer(negotiate_request); - result = S_HELPER_RELEASE; debugs(29, 1, "authenticateNegotiateHandleReply: Error validating user via Negotiate. Error returned '" << reply << "'"); } else { /* protocol error */ @@ -537,8 +528,6 @@ r->handler(r->data, NULL); cbdataReferenceDone(r->data); authenticateStateFree(r); - debugs(29, 9, "authenticateNegotiateHandleReply: telling stateful helper : " << result); - return result; } static void diff -u -r -N squid-3.0.STABLE18/src/auth/ntlm/auth_ntlm.cc squid-3.0.STABLE19/src/auth/ntlm/auth_ntlm.cc --- squid-3.0.STABLE18/src/auth/ntlm/auth_ntlm.cc 2009-08-04 23:57:48.000000000 +1200 +++ squid-3.0.STABLE19/src/auth/ntlm/auth_ntlm.cc 2009-09-06 23:29:36.000000000 +1200 @@ -329,13 +329,12 @@ debugs(29, 5, "NTLMUser::~NTLMUser: doing nothing to clearNTLM scheme data for '" << this << "'"); } -static stateful_helper_callback_t +static void authenticateNTLMHandleReply(void *data, void *lastserver, char *reply) { authenticateStateData *r = static_cast(data); int valid; - stateful_helper_callback_t result = S_HELPER_UNKNOWN; char *blob; AuthUserRequest *auth_user_request; @@ -347,11 +346,10 @@ valid = cbdataReferenceValid(r->data); if (!valid) { - debugs(29, 1, "authenticateNTLMHandleReply: invalid callback data. Releasing helper '" << lastserver << "'."); + debugs(29, 1, "authenticateNTLMHandleReply: invalid callback data. helper '" << lastserver << "'."); cbdataReferenceDone(r->data); authenticateStateFree(r); - debugs(29, 9, "authenticateNTLMHandleReply: telling stateful helper : " << S_HELPER_RELEASE); - return S_HELPER_RELEASE; + return; } if (!reply) { @@ -389,25 +387,22 @@ if (strncasecmp(reply, "TT ", 3) == 0) { /* we have been given a blob to send to the client */ safe_free(ntlm_request->server_blob); - ntlm_request->request->flags.must_keepalive = 1; - if (ntlm_request->request->flags.proxy_keepalive) { - ntlm_request->server_blob = xstrdup(blob); - ntlm_request->auth_state = AUTHENTICATE_STATE_IN_PROGRESS; - auth_user_request->denyMessage("Authentication in progress"); - debugs(29, 4, "authenticateNTLMHandleReply: Need to challenge the client with a server blob '" << blob << "'"); - result = S_HELPER_RESERVE; - } else { - ntlm_request->auth_state = AUTHENTICATE_STATE_FAILED; - auth_user_request->denyMessage("NTLM authentication requires a persistent connection"); - result = S_HELPER_RELEASE; - } + ntlm_request->request->flags.must_keepalive = 1; + if (ntlm_request->request->flags.proxy_keepalive) { + ntlm_request->server_blob = xstrdup(blob); + ntlm_request->auth_state = AUTHENTICATE_STATE_IN_PROGRESS; + auth_user_request->denyMessage("Authentication in progress"); + debugs(29, 4, "authenticateNTLMHandleReply: Need to challenge the client with a server blob '" << blob << "'"); + } else { + ntlm_request->auth_state = AUTHENTICATE_STATE_FAILED; + auth_user_request->denyMessage("NTLM authentication requires a persistent connection"); + } } else if (strncasecmp(reply, "AF ", 3) == 0) { /* we're finished, release the helper */ ntlm_user->username(blob); auth_user_request->denyMessage("Login successful"); safe_free(ntlm_request->server_blob); - result = S_HELPER_RELEASE; debugs(29, 4, "authenticateNTLMHandleReply: Successfully validated user via NTLM. Username '" << blob << "'"); /* connection is authenticated */ debugs(29, 4, "AuthNTLMUserRequest::authenticate: authenticated user " << ntlm_user->username()); @@ -441,7 +436,6 @@ ntlm_request->auth_state = AUTHENTICATE_STATE_FAILED; safe_free(ntlm_request->server_blob); authenticateNTLMReleaseServer(ntlm_request); - result = S_HELPER_RELEASE; debugs(29, 4, "authenticateNTLMHandleReply: Failed validating user via NTLM. Error returned '" << blob << "'"); } else if (strncasecmp(reply, "BH ", 3) == 0) { /* TODO kick off a refresh process. This can occur after a YR or after @@ -453,7 +447,6 @@ ntlm_request->auth_state = AUTHENTICATE_STATE_FAILED; safe_free(ntlm_request->server_blob); authenticateNTLMReleaseServer(ntlm_request); - result = S_HELPER_RELEASE; debugs(29, 1, "authenticateNTLMHandleReply: Error validating user via NTLM. Error returned '" << reply << "'"); } else { /* protocol error */ @@ -467,8 +460,6 @@ r->handler(r->data, NULL); cbdataReferenceDone(r->data); authenticateStateFree(r); - debugs(29, 9, "authenticateNTLMHandleReply: telling stateful helper : " << result); - return result; } static void diff -u -r -N squid-3.0.STABLE18/src/cbdata.h squid-3.0.STABLE19/src/cbdata.h --- squid-3.0.STABLE18/src/cbdata.h 2009-08-04 23:57:49.000000000 +1200 +++ squid-3.0.STABLE19/src/cbdata.h 2009-09-06 23:29:37.000000000 +1200 @@ -88,7 +88,12 @@ #define cbdataAlloc(type) ((type *)cbdataInternalAlloc(CBDATA_##type)) #define cbdataFree(var) do {if (var) {cbdataInternalFree(var); var = NULL;}} while(0) #define cbdataReferenceValidDone(var, ptr) cbdataInternalReferenceDoneValid((void **)&(var), (ptr)) + +/** + * This needs to be defined LAST in teh class definition. It plays with private/public states in C++. + */ #define CBDATA_CLASS2(type) \ + private: \ static cbdata_type CBDATA_##type; \ public: \ void *operator new(size_t size) { \ @@ -98,8 +103,7 @@ } \ void operator delete (void *address) { \ if (address) cbdataInternalFree(address);\ - } \ - private: + } #endif #define cbdataReference(var) (cbdataInternalLock(var), var) #define cbdataReferenceDone(var) do {if (var) {cbdataInternalUnlock(var); var = NULL;}} while(0) @@ -130,7 +134,7 @@ * - RBC 20060820 */ void *data; /* the wrapped data */ - private: + CBDATA_CLASS2(generic_cbdata); }; diff -u -r -N squid-3.0.STABLE18/src/cf.data.pre squid-3.0.STABLE19/src/cf.data.pre --- squid-3.0.STABLE18/src/cf.data.pre 2009-08-04 23:57:49.000000000 +1200 +++ squid-3.0.STABLE19/src/cf.data.pre 2009-09-06 23:29:37.000000000 +1200 @@ -632,7 +632,7 @@ #Recommended minimum configuration: acl manager proto cache_object acl localhost src 127.0.0.1/32 -acl to_localhost dst 127.0.0.0/8 +acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 # # Example rule allowing access from your local networks. # Adapt to list your (internal) IP networks from where browsing @@ -5452,11 +5452,11 @@ LOC: Config.chroot_dir DEFAULT: none DOC_START - Use this to have Squid do a chroot() while initializing. This - also causes Squid to fully drop root privileges after - initializing. This means, for example, if you use a HTTP - port less than 1024 and try to reconfigure, you will may get an - error saying that Squid can not open the port. + Specifies a directiry where Squid should do a chroot() while + initializing. This also causes Squid to fully drop root + privileges after initializing. This means, for example, if you + use a HTTP port less than 1024 and try to reconfigure, you may + get an error saying that Squid can not open the port. DOC_END NAME: balance_on_multiple_ip diff -u -r -N squid-3.0.STABLE18/src/dns_internal.cc squid-3.0.STABLE19/src/dns_internal.cc --- squid-3.0.STABLE18/src/dns_internal.cc 2009-08-04 23:57:49.000000000 +1200 +++ squid-3.0.STABLE19/src/dns_internal.cc 2009-09-06 23:29:37.000000000 +1200 @@ -347,7 +347,7 @@ if (NULL == t) continue; - if (strncmp(t, "ndots:", 6) != 0) { + if (strncmp(t, "ndots:", 6) == 0) { ndots = atoi(t + 6); if (ndots < 1) diff -u -r -N squid-3.0.STABLE18/src/enums.h squid-3.0.STABLE19/src/enums.h --- squid-3.0.STABLE18/src/enums.h 2009-08-04 23:57:49.000000000 +1200 +++ squid-3.0.STABLE19/src/enums.h 2009-09-06 23:29:37.000000000 +1200 @@ -374,18 +374,9 @@ typedef enum { S_HELPER_UNKNOWN, S_HELPER_RESERVE, - S_HELPER_RELEASE, - S_HELPER_DEFER + S_HELPER_RELEASE } stateful_helper_callback_t; -/* stateful helper reservation info */ -typedef enum { - S_HELPER_FREE, /* available for requests */ - S_HELPER_RESERVED, /* in a reserved state - no active request, but state data in the helper shouldn't be disturbed */ - S_HELPER_DEFERRED /* available for requests, and at least one more will come from a previous caller with the server pointer */ -} stateful_helper_reserve_t; - - #if SQUID_SNMP enum { SNMP_C_VIEW, diff -u -r -N squid-3.0.STABLE18/src/forward.h squid-3.0.STABLE19/src/forward.h --- squid-3.0.STABLE18/src/forward.h 2009-08-04 23:57:49.000000000 +1200 +++ squid-3.0.STABLE19/src/forward.h 2009-09-06 23:29:38.000000000 +1200 @@ -82,7 +82,6 @@ static void abort(void*); private: - CBDATA_CLASS2(FwdState); Pointer self; ErrorState *err; int client_fd; @@ -111,6 +110,9 @@ struct sockaddr_in src; #endif + + // NP: keep this last. It plays with private/public + CBDATA_CLASS2(FwdState); }; #endif diff -u -r -N squid-3.0.STABLE18/src/helper.cc squid-3.0.STABLE19/src/helper.cc --- squid-3.0.STABLE18/src/helper.cc 2009-08-04 23:57:49.000000000 +1200 +++ squid-3.0.STABLE19/src/helper.cc 2009-09-06 23:29:38.000000000 +1200 @@ -56,12 +56,10 @@ static void helperStatefulDispatch(helper_stateful_server * srv, helper_stateful_request * r); static void helperKickQueue(helper * hlp); static void helperStatefulKickQueue(statefulhelper * hlp); +static void helperStatefulServerDone(helper_stateful_server * srv); static void helperRequestFree(helper_request * r); static void helperStatefulRequestFree(helper_stateful_request * r); static void StatefulEnqueue(statefulhelper * hlp, helper_stateful_request * r); -static helper_stateful_request *StatefulServerDequeue(helper_stateful_server * srv); -static void StatefulServerEnqueue(helper_stateful_server * srv, helper_stateful_request * r); -static void helperStatefulServerKickQueue(helper_stateful_server * srv); static bool helperStartStats(StoreEntry *sentry, void *hlp, const char *label); @@ -249,10 +247,7 @@ helper_stateful_server *srv = cbdataAlloc(helper_stateful_server); srv->hIpc = hIpc; srv->pid = pid; - srv->flags.reserved = S_HELPER_FREE; - srv->deferred_requests = 0; - srv->stats.deferbyfunc = 0; - srv->stats.deferbycb = 0; + srv->flags.reserved = 0; srv->stats.submits = 0; srv->stats.releases = 0; srv->index = k; @@ -319,8 +314,7 @@ debugs(84, 9, "helperSubmit: " << buf); } -/* lastserver = "server last used as part of a deferred or reserved - * request sequence" +/* lastserver = "server last used as part of a reserved request sequence" */ void helperStatefulSubmit(statefulhelper * hlp, const char *buf, HLPSCB * callback, void *data, helper_stateful_server * lastserver) @@ -346,28 +340,12 @@ if ((buf != NULL) && lastserver) { debugs(84, 5, "StatefulSubmit with lastserver " << lastserver); - /* the queue doesn't count for this assert because queued requests - * have already gone through here and been tested. - * It's legal to have deferred_requests == 0 and queue entries - * and status of S_HELPEER_DEFERRED. - * BUT: It's not legal to submit a new request w/lastserver in - * that state. - */ - assert(!(lastserver->deferred_requests == 0 && - lastserver->flags.reserved == S_HELPER_DEFERRED)); - if (lastserver->flags.reserved != S_HELPER_RESERVED) { - lastserver->stats.submits++; - lastserver->deferred_requests--; - } + assert(lastserver->flags.reserved); + assert(!(lastserver->request)); - if (!(lastserver->request)) { - debugs(84, 5, "StatefulSubmit dispatching"); - helperStatefulDispatch(lastserver, r); - } else { - debugs(84, 5, "StatefulSubmit queuing"); - StatefulServerEnqueue(lastserver, r); - } + debugs(84, 5, "StatefulSubmit dispatching"); + helperStatefulDispatch(lastserver, r); } else { helper_stateful_server *srv; if ((srv = StatefulGetFirstAvailable(hlp))) { @@ -380,149 +358,25 @@ } /* - * helperStatefulDefer - * - * find and add a deferred request to a helper - */ -helper_stateful_server * -helperStatefulDefer(statefulhelper * hlp) -{ - if (hlp == NULL) { - debugs(84, 3, "helperStatefulDefer: hlp == NULL"); - return NULL; - } - - debugs(84, 5, "helperStatefulDefer: Running servers " << hlp->n_running); - - if (hlp->n_running == 0) { - debugs(84, 1, "helperStatefulDefer: No running servers!. "); - return NULL; - } - - helper_stateful_server *rv = StatefulGetFirstAvailable(hlp); - - if (rv == NULL) { - /* - * all currently busy; loop through servers and find server - * with the shortest queue - */ - - for (dlink_node *n = hlp->servers.head; n != NULL; n = n->next) { - helper_stateful_server *srv = (helper_stateful_server *)n->data; - - if (srv->flags.reserved == S_HELPER_RESERVED) - continue; - - if (!srv->flags.shutdown) - continue; - - if ((hlp->IsAvailable != NULL) && (srv->data != NULL) && - !(hlp->IsAvailable(srv->data))) - continue; - - if ((rv != NULL) && (rv->deferred_requests < srv->deferred_requests)) - continue; - - rv = srv; - } - } - - if (rv == NULL) { - debugs(84, 1, "helperStatefulDefer: None available."); - return NULL; - } - - /* consistency check: - * when the deferred count is 0, - * submits + releases == deferbyfunc + deferbycb - * Or in english, when there are no deferred requests, the amount - * we have submitted to the queue or cancelled must equal the amount - * we have said we wanted to be able to submit or cancel - */ - if (rv->deferred_requests == 0) - assert(rv->stats.submits + rv->stats.releases == - rv->stats.deferbyfunc + rv->stats.deferbycb); - - rv->flags.reserved = S_HELPER_DEFERRED; - - rv->deferred_requests++; - - rv->stats.deferbyfunc++; - - return rv; -} - -void -helperStatefulReset(helper_stateful_server * srv) -/* puts this helper back in the queue. the calling app is required to - * manage the state in the helper. - */ -{ - statefulhelper *hlp = srv->parent; - helper_stateful_request *r = srv->request; - - if (r != NULL) { - /* reset attempt DURING an outstaning request */ - debugs(84, 1, "helperStatefulReset: RESET During request " << hlp->id_name << " "); - srv->flags.busy = 0; - srv->roffset = 0; - helperStatefulRequestFree(r); - srv->request = NULL; - } - - srv->flags.busy = 0; - - if (srv->queue.head) { - srv->flags.reserved = S_HELPER_DEFERRED; - } else { - srv->flags.reserved = S_HELPER_FREE; - - if ((srv->parent->OnEmptyQueue != NULL) && (srv->data)) - srv->parent->OnEmptyQueue(srv->data); - } - - helperStatefulServerKickQueue(srv); -} - -/* * DPW 2007-05-08 * * helperStatefulReleaseServer tells the helper that whoever was * using it no longer needs its services. - * - * If the state is S_HELPER_DEFERRED, decrease the deferred count. - * If the count goes to zero, then it can become S_HELPER_FREE. - * - * If the state is S_HELPER_RESERVED, then it should always - * become S_HELPER_FREE. */ void helperStatefulReleaseServer(helper_stateful_server * srv) { debugs(84, 3, HERE << "srv-" << srv->index << " flags.reserved = " << srv->flags.reserved); - if (srv->flags.reserved == S_HELPER_FREE) + if (!srv->flags.reserved) return; srv->stats.releases++; + srv->flags.reserved = 0; - if (srv->flags.reserved == S_HELPER_DEFERRED) { - assert(srv->deferred_requests); - srv->deferred_requests--; - if (srv->deferred_requests) { - debugs(0,0,HERE << "helperStatefulReleaseServer srv->deferred_requests=" << srv->deferred_requests); - return; - } - if (srv->queue.head) { - debugs(0,0,HERE << "helperStatefulReleaseServer srv->queue.head not NULL"); - return; - } - } - - srv->flags.reserved = S_HELPER_FREE; if (srv->parent->OnEmptyQueue != NULL && srv->data) srv->parent->OnEmptyQueue(srv->data); - helperStatefulServerKickQueue(srv); + helperStatefulServerDone(srv); } void * @@ -604,12 +458,11 @@ storeAppendPrintf(sentry, "avg service time: %d msec\n", hlp->stats.avg_svc_time); storeAppendPrintf(sentry, "\n"); - storeAppendPrintf(sentry, "%7s\t%7s\t%7s\t%11s\t%20s\t%s\t%7s\t%7s\t%7s\n", + storeAppendPrintf(sentry, "%7s\t%7s\t%7s\t%11s\t%6s\t%7s\t%7s\t%7s\n", "#", "FD", "PID", "# Requests", - "# Deferred Requests", "Flags", "Time", "Offset", @@ -617,17 +470,15 @@ for (dlink_node *link = hlp->servers.head; link; link = link->next) { helper_stateful_server *srv = (helper_stateful_server *)link->data; - double tt = 0.001 * tvSubMsec(srv->dispatch_time, - srv->flags.busy ? current_time : srv->answer_time); - storeAppendPrintf(sentry, "%7d\t%7d\t%7d\t%11d\t%20d\t%c%c%c%c%c\t%7.3f\t%7d\t%s\n", + double tt = 0.001 * tvSubMsec(srv->dispatch_time, srv->flags.busy ? current_time : srv->answer_time); + storeAppendPrintf(sentry, "%7d\t%7d\t%7d\t%11d\t%c%c%c%c%c\t%7.3f\t%7d\t%s\n", srv->index + 1, srv->rfd, srv->pid, srv->stats.uses, - (int) srv->deferred_requests, srv->flags.busy ? 'B' : ' ', srv->flags.closing ? 'C' : ' ', - srv->flags.reserved == S_HELPER_RESERVED ? 'R' : (srv->flags.reserved == S_HELPER_DEFERRED ? 'D' : ' '), + srv->flags.reserved ? 'R' : ' ', srv->flags.shutdown ? 'S' : ' ', srv->request ? (srv->request->placeholder ? 'P' : ' ') : ' ', tt < 0.0 ? 0.0 : tt, @@ -638,7 +489,7 @@ storeAppendPrintf(sentry, "\nFlags key:\n\n"); storeAppendPrintf(sentry, " B = BUSY\n"); storeAppendPrintf(sentry, " C = CLOSING\n"); - storeAppendPrintf(sentry, " R = RESERVED or DEFERRED\n"); + storeAppendPrintf(sentry, " R = RESERVED\n"); storeAppendPrintf(sentry, " S = SHUTDOWN PENDING\n"); storeAppendPrintf(sentry, " P = PLACEHOLDER\n"); } @@ -746,14 +597,14 @@ continue; } - if (srv->flags.reserved != S_HELPER_FREE) { - debugs(84, 3, "helperStatefulShutdown: " << hlp->id_name << " #" << srv->index + 1 << " is RESERVED."); - continue; - } - - if (srv->deferred_requests) { - debugs(84, 3, "helperStatefulShutdown: " << hlp->id_name << " #" << srv->index + 1 << " has DEFERRED requests."); - continue; + if (srv->flags.reserved) { + if (shutting_down) { + debugs(84, 3, "helperStatefulShutdown: " << hlp->id_name << " #" << srv->index + 1 << " is RESERVED. Closing anyway."); + } + else { + debugs(84, 3, "helperStatefulShutdown: " << hlp->id_name << " #" << srv->index + 1 << " is RESERVED. Not Shutting Down Yet."); + continue; + } } srv->flags.closing = 1; @@ -1140,6 +991,7 @@ if ((t = strchr(srv->rbuf, '\n'))) { /* end of reply found */ + int called = 1; debugs(84, 3, "helperStatefulHandleRead: end of reply found"); if (t > srv->rbuf && t[-1] == '\r') @@ -1148,58 +1000,10 @@ *t = '\0'; if (r && cbdataReferenceValid(r->data)) { - switch ((r->callback(r->data, srv, srv->rbuf))) { /*if non-zero reserve helper */ - - case S_HELPER_UNKNOWN: - fatal("helperStatefulHandleRead: either a non-state aware callback was give to the stateful helper routines, or an uninitialised callback response was received.\n"); - break; - - case S_HELPER_RELEASE: /* helper finished with */ - - if (!srv->deferred_requests && !srv->queue.head) { - srv->flags.reserved = S_HELPER_FREE; - - if ((srv->parent->OnEmptyQueue != NULL) && (srv->data)) - srv->parent->OnEmptyQueue(srv->data); - - debugs(84, 5, "StatefulHandleRead: releasing " << hlp->id_name << " #" << srv->index + 1); - } else { - srv->flags.reserved = S_HELPER_DEFERRED; - debugs(84, 5, "StatefulHandleRead: outstanding deferred requests on " << - hlp->id_name << " #" << srv->index + 1 << - ". reserving for deferred requests."); - } - - break; - - case S_HELPER_RESERVE: /* 'pin' this helper for the caller */ - - if (!srv->queue.head) { - assert(srv->deferred_requests == 0); - srv->flags.reserved = S_HELPER_RESERVED; - debugs(84, 5, "StatefulHandleRead: reserving " << hlp->id_name << " #" << srv->index + 1); - } else { - fatal("StatefulHandleRead: Callback routine attempted to reserve a stateful helper with deferred requests. This can lead to deadlock.\n"); - } - - break; - - case S_HELPER_DEFER: - /* the helper is still needed, but can - * be used for other requests in the meantime. - */ - srv->flags.reserved = S_HELPER_DEFERRED; - srv->deferred_requests++; - srv->stats.deferbycb++; - debugs(84, 5, "StatefulHandleRead: reserving " << hlp->id_name << " #" << srv->index + 1 << " for deferred requests."); - break; - - default: - fatal("helperStatefulHandleRead: unknown stateful helper callback result.\n"); - } - + r->callback(r->data, srv, srv->rbuf); } else { debugs(84, 1, "StatefulHandleRead: no callback data registered"); + called = 0; } srv->flags.busy = 0; @@ -1213,7 +1017,10 @@ tvSubMsec(srv->dispatch_time, current_time), hlp->stats.replies, REDIRECT_AV_FACTOR); - helperStatefulServerKickQueue(srv); + if (called) + helperStatefulServerDone(srv); + else + helperStatefulReleaseServer(srv); } if (srv->rfd != -1) @@ -1278,31 +1085,6 @@ } -static void -StatefulServerEnqueue(helper_stateful_server * srv, helper_stateful_request * r) -{ - dlink_node *link = (dlink_node *)memAllocate(MEM_DLINK_NODE); - dlinkAddTail(r, link, &srv->queue); - /* TODO: warning if the queue on this server is more than X - * We don't check the queue size at the moment, because - * requests hitting here are deferrable - */ - /* hlp->stats.queue_size++; - * if (hlp->stats.queue_size < hlp->n_running) - * return; - * if (squid_curtime - hlp->last_queue_warn < 600) - * return; - * if (shutting_down || reconfiguring) - * return; - * hlp->last_queue_warn = squid_curtime; - * debugs(84, 0, "WARNING: All " << hlp->id_name << " processes are busy."); - * debugs(84, 0, "WARNING: " << hlp->stats.queue_size << " pending requests queued"); - * if (hlp->stats.queue_size > hlp->n_running * 2) - * fatalf("Too many queued %s requests", hlp->id_name); - * debugs(84, 1, "Consider increasing the number of " << hlp->id_name << " processes in your config file." ); */ -} - - static helper_request * Dequeue(helper * hlp) { @@ -1320,21 +1102,6 @@ } static helper_stateful_request * -StatefulServerDequeue(helper_stateful_server * srv) -{ - dlink_node *link; - helper_stateful_request *r = NULL; - - if ((link = srv->queue.head)) { - r = (helper_stateful_request *)link->data; - dlinkDelete(link, &srv->queue); - memFree(link, MEM_DLINK_NODE); - } - - return r; -} - -static helper_stateful_request * StatefulDequeue(statefulhelper * hlp) { dlink_node *link; @@ -1407,7 +1174,7 @@ if (srv->flags.busy) continue; - if (srv->flags.reserved == S_HELPER_RESERVED) + if (srv->flags.reserved) continue; if (srv->flags.shutdown) @@ -1520,6 +1287,7 @@ if (!cbdataReferenceValid(r->data)) { debugs(84, 1, "helperStatefulDispatch: invalid callback data"); helperStatefulRequestFree(r); + helperStatefulReleaseServer(srv); return; } @@ -1527,7 +1295,7 @@ if (r->placeholder == 1) { /* a callback is needed before this request can _use_ a helper. */ - /* we don't care about releasing/deferring this helper. The request NEVER + /* we don't care about releasing this helper. The request NEVER * gets to the helper. So we throw away the return code */ r->callback(r->data, srv, NULL); /* throw away the placeholder */ @@ -1536,12 +1304,13 @@ * request to the helper which is why we test for the request*/ if (srv->request == NULL) - helperStatefulServerKickQueue(srv); + helperStatefulServerDone(srv); return; } srv->flags.busy = 1; + srv->flags.reserved = 1; srv->request = r; srv->dispatch_time = current_time; comm_write(srv->wfd, @@ -1579,18 +1348,11 @@ } static void -helperStatefulServerKickQueue(helper_stateful_server * srv) +helperStatefulServerDone(helper_stateful_server * srv) { - helper_stateful_request *r; - - if ((r = StatefulServerDequeue(srv))) { - helperStatefulDispatch(srv, r); - return; - } - if (!srv->flags.shutdown) { helperStatefulKickQueue(srv->parent); - } else if (!srv->flags.closing && srv->flags.reserved == S_HELPER_FREE && !srv->flags.busy) { + } else if (!srv->flags.closing && !srv->flags.reserved && !srv->flags.busy) { int wfd = srv->wfd; srv->wfd = -1; if (srv->rfd == wfd) diff -u -r -N squid-3.0.STABLE18/src/helper.h squid-3.0.STABLE19/src/helper.h --- squid-3.0.STABLE18/src/helper.h 2009-08-04 23:57:49.000000000 +1200 +++ squid-3.0.STABLE19/src/helper.h 2009-09-06 23:29:38.000000000 +1200 @@ -53,7 +53,7 @@ typedef struct _helper_stateful_flags helper_stateful_flags; -typedef stateful_helper_callback_t HLPSCB(void *, void *lastserver, char *buf); +typedef void HLPSCB(void *, void *lastserver, char *buf); struct _helper { @@ -171,37 +171,24 @@ struct timeval answer_time; dlink_node link; - dlink_list queue; statefulhelper *parent; helper_stateful_request *request; struct _helper_stateful_flags { - -unsigned int busy: - 1; - -unsigned int closing: - 1; - -unsigned int shutdown: - 1; - stateful_helper_reserve_t reserved; - } - - flags; + unsigned int busy:1; + unsigned int closing:1; + unsigned int shutdown:1; + unsigned int reserved:1; + } flags; struct { int uses; int submits; int releases; - int deferbyfunc; - int deferbycb; - } + } stats; - stats; - int deferred_requests; /* current number of deferred requests */ void *data; /* State data used by the calling routines */ void *hIpc; }; @@ -227,7 +214,7 @@ MEMPROXY_CLASS(helper_stateful_request); char *buf; HLPSCB *callback; - int placeholder; /* if 1, this is a dummy request waiting for a stateful helper to become available for deferred requests.*/ + int placeholder; /* if 1, this is a dummy request waiting for a stateful helper to become available */ void *data; }; @@ -246,10 +233,8 @@ SQUIDCEXTERN statefulhelper *helperStatefulCreate(const char *); SQUIDCEXTERN void helperFree(helper *); SQUIDCEXTERN void helperStatefulFree(statefulhelper *); -SQUIDCEXTERN void helperStatefulReset(helper_stateful_server * srv); SQUIDCEXTERN void helperStatefulReleaseServer(helper_stateful_server * srv); SQUIDCEXTERN void *helperStatefulServerGetData(helper_stateful_server * srv); -SQUIDCEXTERN helper_stateful_server *helperStatefulDefer(statefulhelper *); diff -u -r -N squid-3.0.STABLE18/src/HttpHeaderTools.cc squid-3.0.STABLE19/src/HttpHeaderTools.cc --- squid-3.0.STABLE18/src/HttpHeaderTools.cc 2009-08-04 23:57:48.000000000 +1200 +++ squid-3.0.STABLE19/src/HttpHeaderTools.cc 2009-09-06 23:29:36.000000000 +1200 @@ -246,10 +246,16 @@ strListGetItem(const String * str, char del, const char **item, int *ilen, const char **pos) { size_t len; - static char delim[3][8] = { - "\"?,", - "\"\\", - " ?,\t\r\n" + + /* ',' is always enabled as field delimiter as this is required for + * processing merged header values properly, even if Cookie normally + * uses ';' as delimiter. + */ + static char delim[3][8] = + { + "\"?,", + "\"\\", + " ?,\t\r\n" }; int quoted = 0; assert(str && item && pos); @@ -264,7 +270,7 @@ return 0; } - /* skip leading ws and delimiters */ + /* skip leading whitespace and delimiters */ *pos += strspn(*pos, delim[2]); *item = *pos; /* remember item's start */ @@ -272,20 +278,15 @@ /* find next delimiter */ do { *pos += strcspn(*pos, delim[quoted]); - - if (**pos == del) - break; - if (**pos == '"') { quoted = !quoted; *pos += 1; - } - - if (quoted && **pos == '\\') { + } else if (quoted && **pos == '\\') { *pos += 1; - if (**pos) *pos += 1; + } else { + break; /* Delimiter found, marking the end of this value */ } } while (**pos); diff -u -r -N squid-3.0.STABLE18/src/HttpReply.cc squid-3.0.STABLE19/src/HttpReply.cc --- squid-3.0.STABLE18/src/HttpReply.cc 2009-08-04 23:57:48.000000000 +1200 +++ squid-3.0.STABLE19/src/HttpReply.cc 2009-09-06 23:29:36.000000000 +1200 @@ -476,7 +476,7 @@ // skip arbitrary number of spaces... while (pos <= buf->contentSize() && (char)*(buf->content()+pos) == ' ') ++pos; - if (!xisdigit(*(buf->content()+pos))) { + if (pos < buf->contentSize() && !xisdigit(*(buf->content()+pos))) { debugs(58, 3, "HttpReply::sanityCheckStartLine: missing or invalid status number in '" << buf->content() << "'"); *error = HTTP_INVALID_HEADER; return false; diff -u -r -N squid-3.0.STABLE18/src/store_dir.cc squid-3.0.STABLE19/src/store_dir.cc --- squid-3.0.STABLE18/src/store_dir.cc 2009-08-04 23:57:50.000000000 +1200 +++ squid-3.0.STABLE19/src/store_dir.cc 2009-09-06 23:29:38.000000000 +1200 @@ -189,6 +189,10 @@ int load; RefCount sd; + ssize_t objsize = e->objectLen(); + if (objsize != -1) + objsize += e->mem_obj->swap_hdr_sz; + for (i = 0; i <= Config.cacheSwap.n_configured; i++) { if (++dirn >= Config.cacheSwap.n_configured) dirn = 0; @@ -201,7 +205,7 @@ if (sd->cur_size > sd->max_size) continue; - if (!sd->objectSizeIsAcceptable(e->objectLen())) + if (!sd->objectSizeIsAcceptable(objsize)) continue; /* check for error or overload condition */ diff -u -r -N squid-3.0.STABLE18/src/StoreHashIndex.h squid-3.0.STABLE19/src/StoreHashIndex.h --- squid-3.0.STABLE18/src/StoreHashIndex.h 2009-08-04 23:57:48.000000000 +1200 +++ squid-3.0.STABLE19/src/StoreHashIndex.h 2009-09-06 23:29:36.000000000 +1200 @@ -110,13 +110,15 @@ RefCount sd; private: - CBDATA_CLASS2(StoreSearchHashIndex); void copyBucket(); void (*callback)(void *cbdata); void *cbdata; bool _done; int bucket; Vector entries; + + // keep this last. it plays with private/public + CBDATA_CLASS2(StoreSearchHashIndex); }; #endif /* SQUID_STOREHASHINDEX_H */ diff -u -r -N squid-3.0.STABLE18/src/store_swapout.cc squid-3.0.STABLE19/src/store_swapout.cc --- squid-3.0.STABLE18/src/store_swapout.cc 2009-08-04 23:57:50.000000000 +1200 +++ squid-3.0.STABLE19/src/store_swapout.cc 2009-09-06 23:29:38.000000000 +1200 @@ -63,6 +63,15 @@ /* If we start swapping out objects with OutOfBand Metadata, * then this code needs changing */ + + /* TODO: make some sort of data,size refcounted immutable buffer + * and stop fooling ourselves with "const char*" buffers. + */ + + // Create metadata now, possibly in vain: storeCreate needs swap_hdr_sz. + const char *buf = e->getSerialisedMetaData (); + assert(buf); + /* Create the swap file */ generic_cbdata *c = new generic_cbdata(e); sio = storeCreate(e, storeSwapOutFileNotify, storeSwapOutFileClosed, c); @@ -70,6 +79,7 @@ if (sio == NULL) { e->swap_status = SWAPOUT_NONE; delete c; + xfree((char*)buf); storeLog(STORE_LOG_SWAPOUTFAIL, e); return; } @@ -87,16 +97,6 @@ e->swap_dirn = mem->swapout.sio->swap_dirn; /* write out the swap metadata */ - /* TODO: make some sort of data,size refcounted immutable buffer - * for use by this sort of function. - */ - char const *buf = e->getSerialisedMetaData (); - - /* If we start swapping out with out of band metadata, this assert - * will catch it - this code needs to be adjusted if that happens - */ - assert (buf); - storeIOWrite(mem->swapout.sio, buf, mem->swap_hdr_sz, 0, xfree); } diff -u -r -N squid-3.0.STABLE18/test-suite/MemPoolTest.cc squid-3.0.STABLE19/test-suite/MemPoolTest.cc --- squid-3.0.STABLE18/test-suite/MemPoolTest.cc 2009-08-04 23:57:50.000000000 +1200 +++ squid-3.0.STABLE19/test-suite/MemPoolTest.cc 2009-09-06 23:29:39.000000000 +1200 @@ -33,6 +33,9 @@ */ #include "squid.h" + +#if !DISABLE_POOLS + #include "MemPool.h" #include @@ -74,11 +77,15 @@ delete Pool; } +#endif /* DISABLE_POOLS */ + int main (int argc, char **argv) { +#if !DISABLE_POOLS MemPoolTest aTest; aTest.run(); +#endif return 0; }