The Squid Team are pleased to announce the release of Squid-3.0.STABLE16-RC1.
+The Squid Team are pleased to announce the release of Squid-3.0.STABLE16.
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.STABLE16-RC1/scripts/Makefile.in squid-3.0.STABLE16/scripts/Makefile.in --- squid-3.0.STABLE16-RC1/scripts/Makefile.in 2009-05-16 00:47:56.000000000 +1200 +++ squid-3.0.STABLE16/scripts/Makefile.in 2009-06-15 19:31:26.000000000 +1200 @@ -111,6 +111,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KRB5INCS = @KRB5INCS@ +KRB5LIBS = @KRB5LIBS@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBOBJS = @LIBOBJS@ @@ -177,6 +179,7 @@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ +ac_krb5_config = @ac_krb5_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ diff -u -r -N squid-3.0.STABLE16-RC1/snmplib/Makefile.in squid-3.0.STABLE16/snmplib/Makefile.in --- squid-3.0.STABLE16-RC1/snmplib/Makefile.in 2009-05-16 00:47:56.000000000 +1200 +++ squid-3.0.STABLE16/snmplib/Makefile.in 2009-06-15 19:31:26.000000000 +1200 @@ -125,6 +125,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KRB5INCS = @KRB5INCS@ +KRB5LIBS = @KRB5LIBS@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBOBJS = @LIBOBJS@ @@ -191,6 +193,7 @@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ +ac_krb5_config = @ac_krb5_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ diff -u -r -N squid-3.0.STABLE16-RC1/src/auth/Makefile.in squid-3.0.STABLE16/src/auth/Makefile.in --- squid-3.0.STABLE16-RC1/src/auth/Makefile.in 2009-05-16 00:47:57.000000000 +1200 +++ squid-3.0.STABLE16/src/auth/Makefile.in 2009-06-15 19:31:29.000000000 +1200 @@ -147,6 +147,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KRB5INCS = @KRB5INCS@ +KRB5LIBS = @KRB5LIBS@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBOBJS = @LIBOBJS@ @@ -213,6 +215,7 @@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ +ac_krb5_config = @ac_krb5_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ diff -u -r -N squid-3.0.STABLE16-RC1/src/cf.data.pre squid-3.0.STABLE16/src/cf.data.pre --- squid-3.0.STABLE16-RC1/src/cf.data.pre 2009-05-16 00:47:57.000000000 +1200 +++ squid-3.0.STABLE16/src/cf.data.pre 2009-06-15 19:31:30.000000000 +1200 @@ -1090,7 +1090,7 @@ tcp_outgoing_tos ds-field [!]aclname ... Example where normal_service_net uses the TOS value 0x00 - and normal_service_net uses 0x20 + and good_service_net uses 0x20 acl normal_service_net src 10.0.0.0/255.255.255.0 acl good_service_net src 10.0.1.0/255.255.255.0 @@ -2561,6 +2561,11 @@ VIOLATES the HTTP standard. Enabling this feature could make you liable for problems which it causes. + Note: override-expire does not enforce staleness - it only extends + freshness / min. If the server returns a Expires time which + is longer than your max time, Squid will still consider + the object fresh for that period of time. + override-lastmod enforces min age even on objects that were modified recently. diff -u -r -N squid-3.0.STABLE16-RC1/src/dns_internal.cc squid-3.0.STABLE16/src/dns_internal.cc --- squid-3.0.STABLE16-RC1/src/dns_internal.cc 2009-05-16 00:47:58.000000000 +1200 +++ squid-3.0.STABLE16/src/dns_internal.cc 2009-06-15 19:31:30.000000000 +1200 @@ -58,6 +58,9 @@ #ifndef USE_DNSSERVERS #ifdef _SQUID_WIN32_ #include "squid_windows.h" +#define REG_TCPIP_PARA_INTERFACES "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces" +#define REG_TCPIP_PARA "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters" +#define REG_VXD_MSTCP "SYSTEM\\CurrentControlSet\\Services\\VxD\\MSTCP" #endif #ifndef _PATH_RESCONF #define _PATH_RESCONF "/etc/resolv.conf" @@ -374,32 +377,24 @@ char *token; HKEY hndKey; - if (RegOpenKey(HKEY_LOCAL_MACHINE, - "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters", - &hndKey) == ERROR_SUCCESS) { + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, REG_TCPIP_PARA, 0, KEY_QUERY_VALUE, &hndKey) == ERROR_SUCCESS) { DWORD Type = 0; DWORD Size = 0; LONG Result; - Result = - RegQueryValueEx(hndKey, "Domain", NULL, &Type, NULL, - &Size); + Result = RegQueryValueEx(hndKey, "Domain", NULL, &Type, NULL, &Size); if (Result == ERROR_SUCCESS && Size) { t = (char *) xmalloc(Size); - RegQueryValueEx(hndKey, "Domain", NULL, &Type, (LPBYTE) t, - &Size); + RegQueryValueEx(hndKey, "Domain", NULL, &Type, (LPBYTE) t, &Size); debugs(78, 1, "Adding domain " << t << " from Registry"); idnsAddPathComponent(t); xfree(t); } - Result = - RegQueryValueEx(hndKey, "SearchList", NULL, &Type, NULL, - &Size); + Result = RegQueryValueEx(hndKey, "SearchList", NULL, &Type, NULL, &Size); if (Result == ERROR_SUCCESS && Size) { t = (char *) xmalloc(Size); - RegQueryValueEx(hndKey, "SearchList", NULL, &Type, (LPBYTE) t, - &Size); + RegQueryValueEx(hndKey, "SearchList", NULL, &Type, (LPBYTE) t, &Size); token = strtok(t, Separator); while (token) { @@ -431,20 +426,15 @@ case _WIN_OS_WINNT: /* get nameservers from the Windows NT registry */ - if (RegOpenKey(HKEY_LOCAL_MACHINE, - "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters", - &hndKey) == ERROR_SUCCESS) { + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, REG_TCPIP_PARA, 0, KEY_QUERY_VALUE, &hndKey) == ERROR_SUCCESS) { DWORD Type = 0; DWORD Size = 0; LONG Result; - Result = - RegQueryValueEx(hndKey, "DhcpNameServer", NULL, &Type, NULL, - &Size); + Result = RegQueryValueEx(hndKey, "DhcpNameServer", NULL, &Type, NULL, &Size); if (Result == ERROR_SUCCESS && Size) { t = (char *) xmalloc(Size); - RegQueryValueEx(hndKey, "DhcpNameServer", NULL, &Type, (LPBYTE) t, - &Size); + RegQueryValueEx(hndKey, "DhcpNameServer", NULL, &Type, (LPBYTE) t, &Size); token = strtok(t, ", "); while (token) { @@ -455,8 +445,7 @@ xfree(t); } - Result = - RegQueryValueEx(hndKey, "NameServer", NULL, &Type, NULL, &Size); + Result = RegQueryValueEx(hndKey, "NameServer", NULL, &Type, NULL, &Size); if (Result == ERROR_SUCCESS && Size) { t = (char *) xmalloc(Size); @@ -490,64 +479,62 @@ /* get nameservers from the Windows 2000 registry */ /* search all interfaces for DNS server addresses */ - if (RegOpenKey(HKEY_LOCAL_MACHINE, - "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces", - &hndKey) == ERROR_SUCCESS) { + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, REG_TCPIP_PARA_INTERFACES, 0, KEY_READ, &hndKey) == ERROR_SUCCESS) { int i; - char keyname[255]; + DWORD MaxSubkeyLen, InterfacesCount; + char *keyname; + FILETIME ftLastWriteTime; + + if (RegQueryInfoKey(hndKey, NULL, NULL, NULL, &InterfacesCount, &MaxSubkeyLen, NULL, NULL, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) { + keyname = (char *) xmalloc(++MaxSubkeyLen); + for (i = 0; i < (int) InterfacesCount; i++) { + DWORD j; + j = MaxSubkeyLen; + if (RegEnumKeyEx(hndKey, i, keyname, &j, NULL, NULL, NULL, &ftLastWriteTime) == ERROR_SUCCESS) { + char *newkeyname; + newkeyname = (char *) xmalloc(sizeof(REG_TCPIP_PARA_INTERFACES) + j + 2); + strcpy(newkeyname, REG_TCPIP_PARA_INTERFACES); + strcat(newkeyname, "\\"); + strcat(newkeyname, keyname); + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, newkeyname, 0, KEY_QUERY_VALUE, &hndKey2) == ERROR_SUCCESS) { + DWORD Type = 0; + DWORD Size = 0; + LONG Result; + Result = RegQueryValueEx(hndKey2, "DhcpNameServer", NULL, &Type, NULL, &Size); + if (Result == ERROR_SUCCESS && Size) { + t = (char *) xmalloc(Size); + RegQueryValueEx(hndKey2, "DhcpNameServer", NULL, &Type, (LPBYTE)t, &Size); + token = strtok(t, ", "); + while (token) { + debugs(78, 1, "Adding DHCP nameserver " << token << " from Registry"); + idnsAddNameserver(token); + token = strtok(NULL, ", "); + } + xfree(t); + } + + Result = RegQueryValueEx(hndKey2, "NameServer", NULL, &Type, NULL, &Size); + if (Result == ERROR_SUCCESS && Size) { + t = (char *) xmalloc(Size); + RegQueryValueEx(hndKey2, "NameServer", NULL, &Type, (LPBYTE)t, &Size); + token = strtok(t, ", "); + while (token) { + debugs(78, 1, "Adding nameserver " << token << " from Registry"); + idnsAddNameserver(token); + token = strtok(NULL, ", "); + } - for (i = 0; i < 10; i++) { - if (RegEnumKey(hndKey, i, (char *) &keyname, - 255) == ERROR_SUCCESS) { - char newkeyname[255]; - strcpy(newkeyname, - "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces\\"); - strcat(newkeyname, keyname); - - if (RegOpenKey(HKEY_LOCAL_MACHINE, newkeyname, - &hndKey2) == ERROR_SUCCESS) { - DWORD Type = 0; - DWORD Size = 0; - LONG Result; - Result = - RegQueryValueEx(hndKey2, "DhcpNameServer", NULL, - &Type, NULL, &Size); - - if (Result == ERROR_SUCCESS && Size) { - t = (char *) xmalloc(Size); - RegQueryValueEx(hndKey2, "DhcpNameServer", NULL, - &Type, (LPBYTE) t, &Size); - token = strtok(t, ", "); - - while (token) { - debugs(78, 1, "Adding DHCP nameserver " << token << " from Registry"); - idnsAddNameserver(token); - token = strtok(NULL, ", "); + xfree(t); } - xfree(t); - } - Result = - RegQueryValueEx(hndKey2, "NameServer", NULL, &Type, - NULL, &Size); - - if (Result == ERROR_SUCCESS && Size) { - t = (char *) xmalloc(Size); - RegQueryValueEx(hndKey2, "NameServer", NULL, &Type, - (LPBYTE) t, &Size); - token = strtok(t, ", "); - - while (token) { - debugs(78, 1, "Adding nameserver " << token << " from Registry"); - idnsAddNameserver(token); - token = strtok(NULL, ", "); - } - xfree(t); + RegCloseKey(hndKey2); } - RegCloseKey(hndKey2); + xfree(newkeyname); } } + + xfree(keyname); } RegCloseKey(hndKey); @@ -564,14 +551,11 @@ case _WIN_OS_WINME: /* get nameservers from the Windows 9X registry */ - if (RegOpenKey(HKEY_LOCAL_MACHINE, - "SYSTEM\\CurrentControlSet\\Services\\VxD\\MSTCP", - &hndKey) == ERROR_SUCCESS) { + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, REG_VXD_MSTCP, 0, KEY_QUERY_VALUE, &hndKey) == ERROR_SUCCESS) { DWORD Type = 0; DWORD Size = 0; LONG Result; - Result = - RegQueryValueEx(hndKey, "NameServer", NULL, &Type, NULL, &Size); + Result = RegQueryValueEx(hndKey, "NameServer", NULL, &Type, NULL, &Size); if (Result == ERROR_SUCCESS && Size) { t = (char *) xmalloc(Size); diff -u -r -N squid-3.0.STABLE16-RC1/src/errorpage.cc squid-3.0.STABLE16/src/errorpage.cc --- squid-3.0.STABLE16-RC1/src/errorpage.cc 2009-05-16 00:47:58.000000000 +1200 +++ squid-3.0.STABLE16/src/errorpage.cc 2009-06-15 19:31:30.000000000 +1200 @@ -860,7 +860,7 @@ if (strchr(name, ':')) { /* Redirection */ - rep->setHeaders(version, HTTP_MOVED_TEMPORARILY, NULL, "text/html", 0, 0, squid_curtime); + rep->setHeaders(version, HTTP_MOVED_TEMPORARILY, NULL, "text/html", 0, 0, -1); if (err->request) { char *quoted_url = rfc1738_escape_part(urlCanonical(err->request)); @@ -870,7 +870,7 @@ httpHeaderPutStrf(&rep->header, HDR_X_SQUID_ERROR, "%d %s", err->httpStatus, "Access Denied"); } else { MemBuf *content = errorBuildContent(err); - rep->setHeaders(version, err->httpStatus, NULL, "text/html", content->contentSize(), 0, squid_curtime); + rep->setHeaders(version, err->httpStatus, NULL, "text/html", content->contentSize(), 0, -1); /* * include some information for downstream caches. Implicit * replaceable content. This isn't quite sufficient. xerrno is not diff -u -r -N squid-3.0.STABLE16-RC1/src/fs/Makefile.in squid-3.0.STABLE16/src/fs/Makefile.in --- squid-3.0.STABLE16-RC1/src/fs/Makefile.in 2009-05-16 00:47:58.000000000 +1200 +++ squid-3.0.STABLE16/src/fs/Makefile.in 2009-06-15 19:31:31.000000000 +1200 @@ -149,6 +149,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KRB5INCS = @KRB5INCS@ +KRB5LIBS = @KRB5LIBS@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBOBJS = @LIBOBJS@ @@ -215,6 +217,7 @@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ +ac_krb5_config = @ac_krb5_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ diff -u -r -N squid-3.0.STABLE16-RC1/src/HttpHeader.cc squid-3.0.STABLE16/src/HttpHeader.cc --- squid-3.0.STABLE16-RC1/src/HttpHeader.cc 2009-05-16 00:47:57.000000000 +1200 +++ squid-3.0.STABLE16/src/HttpHeader.cc 2009-06-15 19:31:28.000000000 +1200 @@ -84,7 +84,7 @@ {"Cache-Control", HDR_CACHE_CONTROL, ftPCc}, {"Connection", HDR_CONNECTION, ftStr}, {"Content-Base", HDR_CONTENT_BASE, ftStr}, - {"Content-Disposition", HDR_CONTENT_DISPOSITION, ftStr}, /* for now */ + {"Content-Disposition", HDR_CONTENT_DISPOSITION, ftStr}, /* for now */ {"Content-Encoding", HDR_CONTENT_ENCODING, ftStr}, {"Content-Language", HDR_CONTENT_LANGUAGE, ftStr}, {"Content-Length", HDR_CONTENT_LENGTH, ftInt64}, @@ -124,6 +124,8 @@ {"Title", HDR_TITLE, ftStr}, {"Trailers", HDR_TRAILERS, ftStr}, {"Transfer-Encoding", HDR_TRANSFER_ENCODING, ftStr}, + {"Translate", HDR_TRANSLATE, ftStr}, /* for now. may need to crop */ + {"Unless-Modified-Since", HDR_UNLESS_MODIFIED_SINCE, ftStr}, /* for now ignore. may need to crop */ {"Upgrade", HDR_UPGRADE, ftStr}, /* for now */ {"User-Agent", HDR_USER_AGENT, ftStr}, {"Vary", HDR_VARY, ftStr}, /* for now */ diff -u -r -N squid-3.0.STABLE16-RC1/src/HttpHeader.h squid-3.0.STABLE16/src/HttpHeader.h --- squid-3.0.STABLE16-RC1/src/HttpHeader.h 2009-05-16 00:47:57.000000000 +1200 +++ squid-3.0.STABLE16/src/HttpHeader.h 2009-06-15 19:31:28.000000000 +1200 @@ -98,6 +98,8 @@ HDR_TITLE, HDR_TRAILERS, HDR_TRANSFER_ENCODING, + HDR_TRANSLATE, /* IIS custom header we may need to cut off */ + HDR_UNLESS_MODIFIED_SINCE, /* IIS custom header we may need to cut off */ HDR_UPGRADE, HDR_USER_AGENT, HDR_VARY, diff -u -r -N squid-3.0.STABLE16-RC1/src/Makefile.in squid-3.0.STABLE16/src/Makefile.in --- squid-3.0.STABLE16-RC1/src/Makefile.in 2009-05-16 00:47:57.000000000 +1200 +++ squid-3.0.STABLE16/src/Makefile.in 2009-06-15 19:31:28.000000000 +1200 @@ -1663,6 +1663,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KRB5INCS = @KRB5INCS@ +KRB5LIBS = @KRB5LIBS@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBOBJS = @LIBOBJS@ @@ -1729,6 +1731,7 @@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ +ac_krb5_config = @ac_krb5_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ diff -u -r -N squid-3.0.STABLE16-RC1/src/repl/Makefile.in squid-3.0.STABLE16/src/repl/Makefile.in --- squid-3.0.STABLE16-RC1/src/repl/Makefile.in 2009-05-16 00:47:58.000000000 +1200 +++ squid-3.0.STABLE16/src/repl/Makefile.in 2009-06-15 19:31:32.000000000 +1200 @@ -142,6 +142,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KRB5INCS = @KRB5INCS@ +KRB5LIBS = @KRB5LIBS@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBOBJS = @LIBOBJS@ @@ -208,6 +210,7 @@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ +ac_krb5_config = @ac_krb5_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ diff -u -r -N squid-3.0.STABLE16-RC1/src/snmp_agent.cc squid-3.0.STABLE16/src/snmp_agent.cc --- squid-3.0.STABLE16-RC1/src/snmp_agent.cc 2009-05-16 00:47:58.000000000 +1200 +++ squid-3.0.STABLE16/src/snmp_agent.cc 2009-06-15 19:31:32.000000000 +1200 @@ -118,13 +118,13 @@ case CONF_ST_MMAXSZ: Answer = snmp_var_new_integer(Var->name, Var->name_length, - (snint) Config.memMaxSize >> 20, + (snint) (Config.memMaxSize >> 20), ASN_INTEGER); break; case CONF_ST_SWMAXSZ: Answer = snmp_var_new_integer(Var->name, Var->name_length, - (snint) Store::Root().maxSize() >> 10, + (snint) (Store::Root().maxSize() >> 10), ASN_INTEGER); break; diff -u -r -N squid-3.0.STABLE16-RC1/src/squid.h squid-3.0.STABLE16/src/squid.h --- squid-3.0.STABLE16-RC1/src/squid.h 2009-05-16 00:47:58.000000000 +1200 +++ squid-3.0.STABLE16/src/squid.h 2009-06-15 19:31:32.000000000 +1200 @@ -194,13 +194,18 @@ /* * Filedescriptor limits in the different select loops + * + * NP: FreeBSD 7 defines FD_SETSIZE as unsigned but Squid needs + * it to be signed to compare it with signed values. + * Linux and others including FreeBSD <7, define it as signed. + * If this causes any issues please contact squid-dev@squid-cache.org */ #if defined(USE_SELECT) || defined(USE_SELECT_WIN32) /* Limited by design */ -# define SQUID_MAXFD_LIMIT FD_SETSIZE +# define SQUID_MAXFD_LIMIT ((signed int)FD_SETSIZE) #elif defined(USE_POLL) /* Limited due to delay pools */ -# define SQUID_MAXFD_LIMIT FD_SETSIZE +# define SQUID_MAXFD_LIMIT ((signed int)FD_SETSIZE) #elif defined(USE_KQUEUE) || defined(USE_EPOLL) # define SQUID_FDSET_NOUSE 1 #else diff -u -r -N squid-3.0.STABLE16-RC1/src/store_dir.cc squid-3.0.STABLE16/src/store_dir.cc --- squid-3.0.STABLE16-RC1/src/store_dir.cc 2009-05-16 00:47:58.000000000 +1200 +++ squid-3.0.STABLE16/src/store_dir.cc 2009-06-15 19:31:32.000000000 +1200 @@ -788,9 +788,9 @@ /* Calculate size of hash table (maximum currently 64k buckets). */ /* this is very bogus, its specific to the any Store maintaining an * in-core index, not global */ - size_t buckets = Store::Root().maxSize() / Config.Store.avgObjectSize; + size_t buckets = (Store::Root().maxSize() + ( Config.memMaxSize >> 10)) / Config.Store.avgObjectSize; debugs(20, 1, "Swap maxSize " << Store::Root().maxSize() << - " KB, estimated " << buckets << " objects"); + " + " << ( Config.memMaxSize >> 10) << " KB, estimated " << buckets << " objects"); buckets /= Config.Store.objectsPerBucket; debugs(20, 1, "Target number of buckets: " << buckets); /* ideally the full scan period should be configurable, for the @@ -803,7 +803,7 @@ store_table = hash_create(storeKeyHashCmp, store_hash_buckets, storeKeyHashHash); - for (int i = 0; i < Config.cacheSwap.n_configured; i++) + for (int i = 0; i < Config.cacheSwap.n_configured; i++) { /* this starts a search of the store dirs, loading their * index. under the new Store api this should be * driven by the StoreHashIndex, not by each store. @@ -819,7 +819,7 @@ * Step 3: have the hash index walk the searches itself. */ store(i)->init(); - + } } size_t diff -u -r -N squid-3.0.STABLE16-RC1/src/WinSvc.cc squid-3.0.STABLE16/src/WinSvc.cc --- squid-3.0.STABLE16-RC1/src/WinSvc.cc 2009-05-16 00:47:57.000000000 +1200 +++ squid-3.0.STABLE16/src/WinSvc.cc 2009-06-15 19:31:29.000000000 +1200 @@ -522,9 +522,7 @@ return 1; /* Register the service Handler function */ - svcHandle = - RegisterServiceCtrlHandler(WIN32_Service_name, - WIN32_svcHandler); + svcHandle = RegisterServiceCtrlHandler(WIN32_Service_name, WIN32_svcHandler); if (svcHandle == 0) return 1; @@ -542,17 +540,15 @@ safe_free(ConfigFile); /* get config file from Windows Registry */ - if (RegOpenKey(HKEY_LOCAL_MACHINE, REGKEY, &hndKey) == ERROR_SUCCESS) { + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, REGKEY, 0, KEY_QUERY_VALUE, &hndKey) == ERROR_SUCCESS) { DWORD Type = 0; DWORD Size = 0; LONG Result; - Result = - RegQueryValueEx(hndKey, CONFIGFILE, NULL, &Type, NULL, &Size); + Result = RegQueryValueEx(hndKey, CONFIGFILE, NULL, &Type, NULL, &Size); if (Result == ERROR_SUCCESS && Size) { ConfigFile = static_cast