-
-Changes to squid-1.1.beta20 (November 13, 1996):
+ - Fixed setting entry->timestamp for NOT MODIFIED replies.
+ - Changed old HTTP/1.1 Forwarded: header to new Via:.
+ - Changed urlCheckRequest() to allow all FTP requests, including
+ PUT which should get handled by the passthrough module.
+ - Fixed needlessly calling storeSwapFullPath() in
+ storeSwapOutHandle() (Mark Treacy).
+ - Simplified hash linking (Mark Treacy).
+ - Write pid_filename by default (Markus Gyger).
+ - Changed "Invalid dnsserver output" to non-fatal debug_trap()
+ (Joe Ramey).
+ - Changed STORE_IN_MEM_BUCKETS to the prime 229 (Neil Murray).
+
+Changes to squid-1.1.beta20 (November 17, 1996):
- Changed neighbor_domain_type to neighbor_type_domain in
squid.conf.
- - Protect squid_error_entry() calls with check that store_status
- == STORE_PENDING.
- Changed all 'xstrerror' debug messages to section 50.
- More const fixes (Markus Gyger).
- Added xstrncpy() which null-terminates (Markus Gyger).
-# From configure.in Revision: 1.47
+# From configure.in Revision: 1.48
ac_aux_dir=
for ac_dir in aux $srcdir/aux; do
if test -f $ac_dir/install-sh; then
echo $ac_n "checking Maximum number of filedescriptors we can open""... $ac_c" 1>&6
if test "$cross_compiling" = yes; then
- SQUID_FD_SETSIZE=256
+ SQUID_MAXFD=256
else
cat > conftest.$ac_ext <<EOF
#line 2620 "configure"
EOF
eval $ac_link
if test -s conftest && (./conftest; exit) 2>/dev/null; then
- SQUID_FD_SETSIZE=`cat conftestval`
+ SQUID_MAXFD=`cat conftestval`
else
- SQUID_FD_SETSIZE=256
+ SQUID_MAXFD=256
fi
fi
rm -fr conftest*
-echo "$ac_t""$SQUID_FD_SETSIZE" 1>&6
+echo "$ac_t""$SQUID_MAXFD" 1>&6
cat >> confdefs.h <<EOF
-#define SQUID_FD_SETSIZE $SQUID_FD_SETSIZE
+#define SQUID_MAXFD $SQUID_MAXFD
EOF
dnl
dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
dnl
-dnl $Id: configure.in,v 1.48 1996/11/15 07:50:22 wessels Exp $
+dnl $Id: configure.in,v 1.49 1996/11/22 05:07:09 wessels Exp $
dnl
dnl
dnl
AC_INIT(src/main.c)
AC_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.48 $)dnl
+AC_REVISION($Revision: 1.49 $)dnl
AC_PREFIX_DEFAULT(/usr/local/squid)
AC_CONFIG_AUX_DIR(aux)
exit(0);
}
],
-SQUID_FD_SETSIZE=`cat conftestval`,
-SQUID_FD_SETSIZE=256,
-SQUID_FD_SETSIZE=256)
-AC_MSG_RESULT($SQUID_FD_SETSIZE)
-AC_DEFINE_UNQUOTED(SQUID_FD_SETSIZE, $SQUID_FD_SETSIZE)
+SQUID_MAXFD=`cat conftestval`,
+SQUID_MAXFD=256,
+SQUID_MAXFD=256)
+AC_MSG_RESULT($SQUID_MAXFD)
+AC_DEFINE_UNQUOTED(SQUID_MAXFD, $SQUID_MAXFD)
AC_MSG_CHECKING(Default UDP send buffer size)
AC_TRY_RUN([
#undef HAVE_EXT_MALLINFO
/* Maximum number of open filedescriptors */
-#undef SQUID_FD_SETSIZE
+#undef SQUID_MAXFD
/* UDP send buffer size */
#undef SQUID_UDP_SO_SNDBUF
/*
- * $Id: comm.cc,v 1.106 1996/11/15 00:36:16 wessels Exp $
+ * $Id: comm.cc,v 1.107 1996/11/22 05:07:12 wessels Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
}
/*
- * NOTE: set the listen queue to FD_SETSIZE/4 and rely on the kernel to
+ * NOTE: set the listen queue to SQUID_MAXFD/4 and rely on the kernel to
* impose an upper limit. Solaris' listen(3n) page says it has
* no limit on this parameter, but sys/socket.h sets SOMAXCONN
* to 5. HP-UX currently has a limit of 20. SunOS is 5 and
comm_listen(int sock)
{
int x;
- if ((x = listen(sock, FD_SETSIZE >> 2)) < 0) {
+ if ((x = listen(sock, SQUID_MAXFD >> 2)) < 0) {
debug(50, 0, "comm_listen: listen(%d, %d): %s\n",
- FD_SETSIZE >> 2,
+ SQUID_MAXFD >> 2,
sock, xstrerror());
return x;
}
comm_set_fd_lifetime(int fd, int lifetime)
{
debug(5, 3, "comm_set_fd_lifetime: FD %d lft %d\n", fd, lifetime);
- if (fd < 0 || fd > FD_SETSIZE)
+ if (fd < 0 || fd > SQUID_MAXFD)
return 0;
if (lifetime < 0)
return fd_lifetime[fd] = -1;
{
FD_ENTRY *conn = NULL;
debug(5, 5, "comm_close: FD %d\n", fd);
- if (fd < 0 || fd >= FD_SETSIZE)
+ if (fd < 0 || fd >= SQUID_MAXFD)
return;
conn = &fd_table[fd];
if (!conn->openned)
{
int i;
- fd_table = xcalloc(FD_SETSIZE, sizeof(FD_ENTRY));
- meta_data.misc += FD_SETSIZE * sizeof(FD_ENTRY);
+ fd_table = xcalloc(SQUID_MAXFD, sizeof(FD_ENTRY));
+ meta_data.misc += SQUID_MAXFD * sizeof(FD_ENTRY);
/* Keep a few file descriptors free so that we don't run out of FD's
* after accepting a client but before it opens a socket or a file.
- * Since FD_SETSIZE can be as high as several thousand, don't waste them */
- RESERVED_FD = min(100, FD_SETSIZE / 4);
+ * Since SQUID_MAXFD can be as high as several thousand, don't waste them */
+ RESERVED_FD = min(100, SQUID_MAXFD / 4);
/* hardwired lifetimes */
- fd_lifetime = xmalloc(sizeof(int) * FD_SETSIZE);
- for (i = 0; i < FD_SETSIZE; i++)
+ fd_lifetime = xmalloc(sizeof(int) * SQUID_MAXFD);
+ for (i = 0; i < SQUID_MAXFD; i++)
comm_set_fd_lifetime(i, -1); /* denotes invalid */
- meta_data.misc += FD_SETSIZE * sizeof(int);
+ meta_data.misc += SQUID_MAXFD * sizeof(int);
zero_tv.tv_sec = 0;
zero_tv.tv_usec = 0;
return 0;
FD_ENTRY *f = NULL;
debug(5, 0, "examine_select: Examining open file descriptors...\n");
- for (fd = 0; fd < FD_SETSIZE; fd++) {
+ for (fd = 0; fd < SQUID_MAXFD; fd++) {
FD_ZERO(&read_x);
FD_ZERO(&write_x);
tv.tv_sec = tv.tv_usec = 0;
FD_SET(fd, &write_x);
else
continue;
- num = select(FD_SETSIZE, &read_x, &write_x, NULL, &tv);
+ num = select(SQUID_MAXFD, &read_x, &write_x, NULL, &tv);
if (num > -1) {
debug(5, 5, "FD %d is valid.\n", fd);
continue;
FD_ENTRY *f = NULL;
void *data;
/* scan for timeout */
- for (fd = 0; fd < FD_SETSIZE; ++fd) {
+ for (fd = 0; fd < SQUID_MAXFD; ++fd) {
f = &fd_table[fd];
if ((hdl = f->timeout_handler) == NULL)
continue;
PF hdl = NULL;
- for (fd = 0; fd < FD_SETSIZE; fd++) {
+ for (fd = 0; fd < SQUID_MAXFD; fd++) {
if ((lft = comm_get_fd_lifetime(fd)) == -1)
continue;
if (lft > squid_curtime)
static void
Reserve_More_FDs(void)
{
- if (RESERVED_FD < FD_SETSIZE - 64) {
+ if (RESERVED_FD < SQUID_MAXFD - 64) {
RESERVED_FD = RESERVED_FD + 1;
- } else if (RESERVED_FD == FD_SETSIZE - 64) {
+ } else if (RESERVED_FD == SQUID_MAXFD - 64) {
RESERVED_FD = RESERVED_FD + 1;
debug(5, 0, "Don't you have a tiny open-file table size of %d\n",
- FD_SETSIZE - RESERVED_FD);
+ SQUID_MAXFD - RESERVED_FD);
}
}
/*
- * $Id: disk.cc,v 1.43 1996/11/15 00:36:17 wessels Exp $
+ * $Id: disk.cc,v 1.44 1996/11/22 05:07:12 wessels Exp $
*
* DEBUG: section 6 Disk I/O Routines
* AUTHOR: Harvest Derived
{
int fd;
- file_table = xcalloc(FD_SETSIZE, sizeof(FileEntry));
- meta_data.misc += FD_SETSIZE * sizeof(FileEntry);
- for (fd = 0; fd < FD_SETSIZE; fd++) {
+ file_table = xcalloc(SQUID_MAXFD, sizeof(FileEntry));
+ meta_data.misc += SQUID_MAXFD * sizeof(FileEntry);
+ for (fd = 0; fd < SQUID_MAXFD; fd++) {
file_table[fd].filename[0] = '\0';
file_table[fd].at_eof = NO;
file_table[fd].open_stat = FILE_NOT_OPEN;
/*
- * $Id: ftp.cc,v 1.84 1996/11/15 17:26:19 wessels Exp $
+ * $Id: ftp.cc,v 1.85 1996/11/22 05:07:13 wessels Exp $
*
* DEBUG: section 9 File Transfer Protocol (FTP)
* AUTHOR: Harvest Derived
return -1;
}
ftpget_port = ntohs(S.sin_port);
- listen(cfd, FD_SETSIZE >> 2);
+ listen(cfd, SQUID_MAXFD >> 2);
if ((pid = fork()) < 0) {
debug(50, 0, "ftpInitialize: fork: %s\n", xstrerror());
comm_close(cfd);
/*
- * $Id: main.cc,v 1.114 1996/11/15 00:36:21 wessels Exp $
+ * $Id: main.cc,v 1.115 1996/11/22 05:07:14 wessels Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
debug(1, 0, "Starting Squid Cache version %s for %s...\n",
version_string,
CONFIG_HOST_TYPE);
- debug(1, 1, "With %d file descriptors available\n", FD_SETSIZE);
+ debug(1, 1, "With %d file descriptors available\n", SQUID_MAXFD);
if (first_time) {
stmemInit(); /* stmem must go before at least redirect */
setMaxFD();
if (opt_catch_signals)
- for (n = FD_SETSIZE; n > 2; n--)
+ for (n = SQUID_MAXFD; n > 2; n--)
close(n);
/*init comm module */
/*
- * $Id: squid.h,v 1.74 1996/11/12 22:37:16 wessels Exp $
+ * $Id: squid.h,v 1.75 1996/11/22 05:07:15 wessels Exp $
*
* AUTHOR: Duane Wessels
*
#include "config.h"
-#if SQUID_FD_SETSIZE > 256
-#define FD_SETSIZE SQUID_FD_SETSIZE
-#endif
-
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
/*
- * $Id: stat.cc,v 1.105 1996/11/15 00:36:22 wessels Exp $
+ * $Id: stat.cc,v 1.106 1996/11/22 05:07:15 wessels Exp $
*
* DEBUG: section 18 Cache Manager Statistics
* AUTHOR: Harvest Derived
"Remote Address",
"Description");
storeAppendPrintf(sentry, "{---- ------ ---- ---- --------------------- ------------------------------}\n");
- for (i = 0; i < FD_SETSIZE; i++) {
+ for (i = 0; i < SQUID_MAXFD; i++) {
if (!fdstat_isopen(i))
continue;
j = fdstatGetType(i);
storeAppendPrintf(sentry, "{File descriptor usage for %s:}\n", appname);
storeAppendPrintf(sentry, "{\tMax number of file desc available: %4d}\n",
- FD_SETSIZE);
+ SQUID_MAXFD);
storeAppendPrintf(sentry, "{\tLargest file desc currently in use: %4d}\n",
fdstat_biggest_fd());
storeAppendPrintf(sentry, "{\tAvailable number of file descriptors: %4d}\n",
/*
- * $Id: stmem.cc,v 1.33 1996/11/06 23:14:59 wessels Exp $
+ * $Id: stmem.cc,v 1.34 1996/11/22 05:07:16 wessels Exp $
*
* DEBUG: section 19 Memory Primitives
* AUTHOR: Harvest Derived
request_pool.page_size = sizeof(request_t);
request_pool.total_pages_allocated = 0;
request_pool.n_pages_in_use = 0;
- request_pool.max_pages = FD_SETSIZE >> 3;
+ request_pool.max_pages = SQUID_MAXFD >> 3;
mem_obj_pool.page_size = sizeof(MemObject);
mem_obj_pool.total_pages_allocated = 0;
mem_obj_pool.n_pages_in_use = 0;
- mem_obj_pool.max_pages = FD_SETSIZE >> 3;
+ mem_obj_pool.max_pages = SQUID_MAXFD >> 3;
#if PURIFY
debug(19, 0, "Disabling stacks under purify\n");
/*
- * $Id: tools.cc,v 1.84 1996/11/19 07:21:15 wessels Exp $
+ * $Id: tools.cc,v 1.85 1996/11/22 05:07:17 wessels Exp $
*
* DEBUG: section 21 Misc Functions
* AUTHOR: Harvest Derived
if (getrlimit(RLIMIT_NOFILE, &rl) < 0) {
debug(50, 0, "setrlimit: RLIMIT_NOFILE: %s\n", xstrerror());
} else {
- rl.rlim_cur = FD_SETSIZE;
+ rl.rlim_cur = SQUID_MAXFD;
if (rl.rlim_cur > rl.rlim_max)
rl.rlim_cur = rl.rlim_max;
if (setrlimit(RLIMIT_NOFILE, &rl) < 0) {
if (getrlimit(RLIMIT_OFILE, &rl) < 0) {
debug(50, 0, "setrlimit: RLIMIT_NOFILE: %s\n", xstrerror());
} else {
- rl.rlim_cur = FD_SETSIZE;
+ rl.rlim_cur = SQUID_MAXFD;
if (rl.rlim_cur > rl.rlim_max)
rl.rlim_cur = rl.rlim_max;
if (setrlimit(RLIMIT_OFILE, &rl) < 0) {