From: wessels <> Date: Thu, 15 Aug 1996 04:56:59 +0000 (+0000) Subject: squid_1_0_7 changes X-Git-Tag: SQUID_3_0_PRE1~5967 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=004b3381d0a0c91009912d7f70c8f40933fc8566;p=thirdparty%2Fsquid.git squid_1_0_7 changes --- diff --git a/CONTRIBUTORS b/CONTRIBUTORS index e207559d5a..3353955875 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -27,6 +27,7 @@ and ideas to make this software available. Alexander B. Demenshin Tony Lorimer Igor Vinokurov + Russell Street Development of this caching software is funded by the National Science diff --git a/ChangeLog b/ChangeLog index f9c1e6d2c0..086a69f7b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Changes to squid-1.1.alpha9: + + - Fixed parsing of redirected URLs. + - Changed URL redirection to pass in client address, ident, and method. + - Fixed NULL pointer coredump in log_append(). + - Don't swap negative-cache objects to disk (storeCheckSwappable()) + - Only purge MemObject if entry is swapped to disk. + - Includes all squid-1.0 changes up to squid-1.0.7 + Changes to squid-1.1.alpha8: - Removed all references to hierarchy.log. @@ -80,6 +89,15 @@ Changes to squid-1.1.alpha2: - Added support for RFC931/ident ============================================================================== +Changes to squid-1.0.7 (August 14, 1996): + + - Added "store_clean" routines to periodically remove orphaned + swap files. + - Increased StoreEntry->method_t from 3 to 4 bits, probably fixes + storeGenerate*Key() coredumps. + - Added debugging to examine_select(). + - Added peer address to debugging for Ignored ICP packets. + Changes to squid-1.0.6 (August 12, 1996): - Fixed coredump in icpStateFree() for bad requests. diff --git a/configure b/configure index 3a9e485fef..561387e127 100755 --- a/configure +++ b/configure @@ -517,7 +517,7 @@ fi -# From configure.in Revision: 1.24 +# From configure.in Revision: 1.25 ac_aux_dir= for ac_dir in aux $srcdir/aux; do if test -f $ac_dir/install-sh; then @@ -579,10 +579,6 @@ fi if test -z "$CACHE_ICP_PORT"; then CACHE_ICP_PORT="3130" fi -if test -z "$CACHE_FTP_PORT"; then - CACHE_FTP_PORT="3132" -fi - @@ -733,7 +729,7 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error @@ -747,7 +743,7 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error @@ -1045,7 +1041,7 @@ if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1085,7 +1081,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&6 else cat > conftest.$ac_ext < #include @@ -1201,7 +1197,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1219,7 +1215,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1240,7 +1236,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1323,7 +1319,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -1354,7 +1350,7 @@ done echo $ac_n "checking for tm->tm_gmtoff""... $ac_c" 1>&6 cat > conftest.$ac_ext < #include @@ -1380,7 +1376,7 @@ rm -f conftest* echo $ac_n "checking for extended mallinfo""... $ac_c" 1>&6 cat > conftest.$ac_ext < #include @@ -1412,7 +1408,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1446,7 +1442,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1480,7 +1476,7 @@ if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return 0; } @@ -1512,7 +1508,7 @@ if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&6 else cat > conftest.$ac_ext < conftest.$ac_ext < @@ -2261,7 +2257,7 @@ if test "$cross_compiling" = yes; then SQUID_UDP_SO_SNDBUF=8192 else cat > conftest.$ac_ext < @@ -2297,7 +2293,7 @@ if test "$cross_compiling" = yes; then SQUID_UDP_SO_RCVBUF=8192 else cat > conftest.$ac_ext < @@ -2333,7 +2329,7 @@ if test "$cross_compiling" = yes; then SQUID_TCP_SO_SNDBUF=8192 else cat > conftest.$ac_ext < @@ -2369,7 +2365,7 @@ if test "$cross_compiling" = yes; then SQUID_TCP_SO_RCVBUF=8192 else cat > conftest.$ac_ext < @@ -2402,7 +2398,7 @@ EOF echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6 cat > conftest.$ac_ext < int main() { return 0; } @@ -2575,7 +2571,6 @@ s%@host_vendor@%$host_vendor%g s%@host_os@%$host_os%g s%@CACHE_HTTP_PORT@%$CACHE_HTTP_PORT%g s%@CACHE_ICP_PORT@%$CACHE_ICP_PORT%g -s%@CACHE_FTP_PORT@%$CACHE_FTP_PORT%g s%@CC@%$CC%g s%@CPP@%$CPP%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g diff --git a/configure.in b/configure.in index 5899003789..0a2d567306 100644 --- a/configure.in +++ b/configure.in @@ -3,13 +3,13 @@ dnl Configuration input file for Squid dnl dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9) dnl -dnl $Id: configure.in,v 1.25 1996/08/12 23:37:21 wessels Exp $ +dnl $Id: configure.in,v 1.26 1996/08/14 22:57:01 wessels Exp $ dnl dnl dnl AC_INIT(src/main.c) AC_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.25 $)dnl +AC_REVISION($Revision: 1.26 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AC_CONFIG_AUX_DIR(aux) @@ -30,14 +30,10 @@ fi if test -z "$CACHE_ICP_PORT"; then CACHE_ICP_PORT="3130" fi -if test -z "$CACHE_FTP_PORT"; then - CACHE_FTP_PORT="3132" -fi dnl Subsitutions AC_SUBST(CACHE_HTTP_PORT) AC_SUBST(CACHE_ICP_PORT) -AC_SUBST(CACHE_FTP_PORT) AC_DEFINE_UNQUOTED(CONFIG_HOST_TYPE, "$host") diff --git a/include/version.h b/include/version.h index 0e00cb1c36..7f53d12b47 100644 --- a/include/version.h +++ b/include/version.h @@ -1,7 +1,7 @@ -/* $Id: version.h,v 1.26 1996/08/12 23:27:26 wessels Exp $ +/* $Id: version.h,v 1.27 1996/08/14 22:57:03 wessels Exp $ * * SQUID_VERSION - String for version id of this distribution */ #ifndef SQUID_VERSION -#define SQUID_VERSION "1.1.alpha8" +#define SQUID_VERSION "1.1.alpha9" #endif diff --git a/src/Makefile.in b/src/Makefile.in index 4ac58f42ff..5c018f0ed8 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.in,v 1.32 1996/07/27 07:07:41 wessels Exp $ +# $Id: Makefile.in,v 1.33 1996/08/14 22:57:08 wessels Exp $ # # Uncomment and customize the following to suit your needs: # @@ -58,9 +58,8 @@ OBJS = acl.o async_io.o background.o cache_cf.o errorpage.o \ fdstat.o filemap.o ftp.o fqdncache.o gopher.o \ hash.o http.o icp.o ident.o ipcache.o \ main.o mime.o neighbors.o objcache.o \ - proto.o redirect.o send-announce.o ssl.o stack.o \ - stat.o stmem.o \ - store.o storetoString.o tools.o ttl.o \ + proto.o send-announce.o ssl.o stack.o stat.o stmem.o \ + store.o store_clean.o storetoString.o tools.o ttl.o \ url.o wais.o $(XTRA_OBJS) DEFAULTS = \ diff --git a/src/comm.cc b/src/comm.cc index b340bb2ad7..1e83a9b941 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1,6 +1,6 @@ /* - * $Id: comm.cc,v 1.52 1996/08/12 23:37:22 wessels Exp $ + * $Id: comm.cc,v 1.53 1996/08/14 22:57:09 wessels Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -1088,6 +1088,8 @@ static int examine_select(readfds, writefds, exceptfds) if (num < 0) { f = &fd_table[fd]; debug(5, 0, "WARNING: FD %d has handlers, but it's invalid.\n", fd); + debug(5, 0, "FD %d is a %s\n", fd, fdstatTypeStr[fdstatGetType(fd)]); + debug(5, 0, "--> %s\n", fd_note(fd, NULL)); debug(5, 0, "lifetm:%p tmout:%p read:%p write:%p expt:%p\n", f->lifetime_handler, f->timeout_handler, diff --git a/src/main.cc b/src/main.cc index e75c195feb..fb7f662eff 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,5 +1,5 @@ /* - * $Id: main.cc,v 1.58 1996/08/12 23:37:24 wessels Exp $ + * $Id: main.cc,v 1.59 1996/08/14 22:57:11 wessels Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -476,6 +476,7 @@ int main(argc, argv) int errcount = 0; int n; /* # of GC'd objects */ time_t last_maintain = 0; + time_t last_dirclean = 0; time_t last_announce = 0; time_t loop_delay; @@ -542,6 +543,13 @@ int main(argc, argv) storeMaintainSwapSpace(); last_maintain = squid_curtime; } + if (squid_curtime - last_dirclean > 15 + && store_rebuilding == STORE_NOT_REBUILDING) { + /* clean a cache directory every 15 seconds */ + /* 15 * 16 * 256 = 17 hrs */ + storeDirClean(); + last_dirclean = squid_curtime; + } if (rotate_pending) { ftpServerClose(); _db_rotate_log(); /* cache.log */ diff --git a/src/neighbors.cc b/src/neighbors.cc index 47e2095e53..c90df27450 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -1,5 +1,5 @@ /* - * $Id: neighbors.cc,v 1.40 1996/07/27 07:07:43 wessels Exp $ + * $Id: neighbors.cc,v 1.41 1996/08/14 22:57:12 wessels Exp $ * * DEBUG: section 15 Neighbor Routines * AUTHOR: Harvest Derived @@ -584,7 +584,7 @@ void neighborsUdpAck(fd, url, header, from, entry, data, data_sz) if (header->opcode == ICP_OP_SECHO) { /* Received source-ping reply */ if (e) { - debug(15, 1, "neighborsUdpAck: Ignoring SECHO from %s\n", e->host); + debug(15, 1, "Ignoring SECHO from neighbor %s\n", e->host); } else { /* if we reach here, source-ping reply is the first 'parent', * so fetch directly from the source */ @@ -623,7 +623,8 @@ void neighborsUdpAck(fd, url, header, from, entry, data, data_sz) } } else if (header->opcode == ICP_OP_HIT) { if (e == NULL) { - debug(15, 1, "neighborsUdpAck: Ignoring HIT from non-neighbor\n"); + debug(15, 1, "Ignoring HIT from non-neighbor %s\n", + inet_ntoa(from->sin_addr)); } else { hierarchyNote(entry->mem_obj->request, e->type == EDGE_SIBLING ? HIER_SIBLING_HIT : HIER_PARENT_HIT, @@ -636,7 +637,8 @@ void neighborsUdpAck(fd, url, header, from, entry, data, data_sz) } } else if (header->opcode == ICP_OP_DECHO) { if (e == NULL) { - debug(15, 1, "neighborsUdpAck: Ignoring DECHO from non-neighbor\n"); + debug(15, 1, "Ignoring DECHO from non-neighbor %s\n", + inet_ntoa(from->sin_addr)); } else if (e->type == EDGE_SIBLING) { fatal_dump("neighborsUdpAck: Found non-ICP cache as SIBLING\n"); } else { @@ -648,7 +650,8 @@ void neighborsUdpAck(fd, url, header, from, entry, data, data_sz) } } else if (header->opcode == ICP_OP_MISS) { if (e == NULL) { - debug(15, 1, "neighborsUdpAck: Ignoring MISS from non-neighbor\n"); + debug(15, 1, "Ignoring MISS from non-neighbor %s\n", + inet_ntoa(from->sin_addr)); } else if (e->type == EDGE_PARENT) { w_rtt = tvSubMsec(mem->start_ping, current_time) / e->weight; if (mem->w_rtt == 0 || w_rtt < mem->w_rtt) { @@ -658,7 +661,8 @@ void neighborsUdpAck(fd, url, header, from, entry, data, data_sz) } } else if (header->opcode == ICP_OP_DENIED) { if (e == NULL) { - debug(15, 1, "neighborsUdpAck: Ignoring DENIED from non-neighbor\n"); + debug(15, 1, "Ignoring DENIED from non-neighbor %s\n", + inet_ntoa(from->sin_addr)); } else if (e->stats.pings_acked > 100) { if (100 * e->stats.counts[ICP_OP_DENIED] / e->stats.pings_acked > 95) { debug(15, 0, "95%% of replies from '%s' are UDP_DENIED\n", e->host); diff --git a/src/squid.h b/src/squid.h index 74a8dc3f8d..8970801f06 100644 --- a/src/squid.h +++ b/src/squid.h @@ -1,6 +1,6 @@ /* - * $Id: squid.h,v 1.35 1996/07/26 16:59:06 wessels Exp $ + * $Id: squid.h,v 1.36 1996/08/14 22:57:13 wessels Exp $ * * AUTHOR: Duane Wessels * @@ -289,3 +289,4 @@ extern char *storeToString _PARAMS((StoreEntry *)); extern void ttlSet _PARAMS((StoreEntry *)); extern void ttlAddToList _PARAMS((char *, time_t, int, time_t)); extern int waisStart _PARAMS((int, char *, method_t, char *, StoreEntry *)); +extern void storeDirClean _PARAMS((void)); diff --git a/src/store.cc b/src/store.cc index 801d75dfb6..0bc2270579 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,5 +1,5 @@ /* - * $Id: store.cc,v 1.80 1996/08/14 21:57:08 wessels Exp $ + * $Id: store.cc,v 1.81 1996/08/14 22:57:16 wessels Exp $ * * DEBUG: section 20 Storeage Manager * AUTHOR: Harvest Derived @@ -133,8 +133,6 @@ #define REBUILD_TIMESTAMP_DELTA_MAX 2 #define MAX_SWAP_FILE (1<<21) #define SWAP_BUF DISK_PAGE_SIZE -#define SWAP_DIRECTORIES_L1 16 -#define SWAP_DIRECTORIES_L2 256 #define WITH_MEMOBJ 1 #define WITHOUT_MEMOBJ 0