Alexander B. Demenshin <aldem@barnet.kharkov.ua>
Tony Lorimer <tlorimer@au.mdis.com>
Igor Vinokurov <igor@cs.ibank.ru>
+ Russell Street <r.street@auckland.ac.nz>
Development of this caching software is funded by the National Science
+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.
- 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.
-# 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
if test -z "$CACHE_ICP_PORT"; then
CACHE_ICP_PORT="3130"
fi
-if test -z "$CACHE_FTP_PORT"; then
- CACHE_FTP_PORT="3132"
-fi
-
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 737 "configure"
+#line 733 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 751 "configure"
+#line 747 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1049 "configure"
+#line 1045 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1089 "configure"
+#line 1085 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1124 "configure"
+#line 1120 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_cv_c_cross=yes
else
cat > conftest.$ac_ext <<EOF
-#line 1161 "configure"
+#line 1157 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1183 "configure"
+#line 1179 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
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
-#line 1205 "configure"
+#line 1201 "configure"
#include "confdefs.h"
#include <string.h>
EOF
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
-#line 1223 "configure"
+#line 1219 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 1244 "configure"
+#line 1240 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1327 "configure"
+#line 1323 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
echo $ac_n "checking for tm->tm_gmtoff""... $ac_c" 1>&6
cat > conftest.$ac_ext <<EOF
-#line 1358 "configure"
+#line 1354 "configure"
#include "confdefs.h"
#include <time.h>
#include <sys/time.h>
echo $ac_n "checking for extended mallinfo""... $ac_c" 1>&6
cat > conftest.$ac_ext <<EOF
-#line 1384 "configure"
+#line 1380 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <malloc.h>
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1416 "configure"
+#line 1412 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1450 "configure"
+#line 1446 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1484 "configure"
+#line 1480 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() { return 0; }
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1516 "configure"
+#line 1512 "configure"
#include "confdefs.h"
#ifdef __GNUC__
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1575 "configure"
+#line 1571 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1604 "configure"
+#line 1600 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1658 "configure"
+#line 1654 "configure"
#include "confdefs.h"
find_stack_direction ()
{
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1703 "configure"
+#line 1699 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1743 "configure"
+#line 1739 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lmalloc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1783 "configure"
+#line 1779 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1817 "configure"
+#line 1813 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lbsd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1857 "configure"
+#line 1853 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-l44bsd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1898 "configure"
+#line 1894 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1932 "configure"
+#line 1928 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1967 "configure"
+#line 1963 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-labi $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2004 "configure"
+#line 2000 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lposix4 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2038 "configure"
+#line 2034 "configure"
#include "confdefs.h"
int main() { return 0; }
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2145 "configure"
+#line 2141 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
SQUID_FD_SETSIZE=256
else
cat > conftest.$ac_ext <<EOF
-#line 2195 "configure"
+#line 2191 "configure"
#include "confdefs.h"
#include <unistd.h>
SQUID_UDP_SO_SNDBUF=8192
else
cat > conftest.$ac_ext <<EOF
-#line 2265 "configure"
+#line 2261 "configure"
#include "confdefs.h"
#include <sys/types.h>
SQUID_UDP_SO_RCVBUF=8192
else
cat > conftest.$ac_ext <<EOF
-#line 2301 "configure"
+#line 2297 "configure"
#include "confdefs.h"
#include <sys/types.h>
SQUID_TCP_SO_SNDBUF=8192
else
cat > conftest.$ac_ext <<EOF
-#line 2337 "configure"
+#line 2333 "configure"
#include "confdefs.h"
#include <sys/types.h>
SQUID_TCP_SO_RCVBUF=8192
else
cat > conftest.$ac_ext <<EOF
-#line 2373 "configure"
+#line 2369 "configure"
#include "confdefs.h"
#include <sys/types.h>
echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6
cat > conftest.$ac_ext <<EOF
-#line 2406 "configure"
+#line 2402 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() { return 0; }
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
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)
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")
-/* $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
#
# 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:
#
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 = \
/*
- * $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
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,
/*
- * $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
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;
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 */
/*
- * $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
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 */
}
} 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,
}
} 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 {
}
} 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) {
}
} 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);
/*
- * $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
*
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));
/*
- * $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
#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