]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
merge with SQUID_1_0_6
authorwessels <>
Tue, 13 Aug 1996 05:37:21 +0000 (05:37 +0000)
committerwessels <>
Tue, 13 Aug 1996 05:37:21 +0000 (05:37 +0000)
ChangeLog
configure
configure.in
src/comm.cc
src/main.cc
src/store.cc
src/url.cc

index 578ca366ca15e5fb3ffc1281631fec12100d268a..f9c1e6d2c03eb43351d6050fa1959c3315785111 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@ Changes to squid-1.1.alpha8:
        - Fixed "tty input" bug where a reverse lookup request was
          written to stdout.
        - Cleaned up pointers in protoUnregister().
+       - Includes all squid-1.0 changes up to squid-1.0.6.
 
 Changes to squid-1.1.alpha7:
 
index 11de7756c12948c98bff9bbecd4bee6b58c825db..3a9e485feff85b73156bcbd26c0114148a5b7897 100755 (executable)
--- a/configure
+++ b/configure
@@ -517,7 +517,7 @@ fi
 
 
 
-# From configure.in Revision: 1.23 
+# From configure.in Revision: 1.24 
 ac_aux_dir=
 for ac_dir in aux $srcdir/aux; do
   if test -f $ac_dir/install-sh; then
@@ -2234,6 +2234,8 @@ main() {
         i = _NFILE;
 #else
        while((j=open("/dev/null", 0)) > 0) i=j;
+        close(i); close(i-1);
+       i++;
 #endif
        fprintf (fopen("conftestval", "w"), "%d\n", i);
        exit(0);
@@ -2259,7 +2261,7 @@ if test "$cross_compiling" = yes; then
   SQUID_UDP_SO_SNDBUF=8192
 else
 cat > conftest.$ac_ext <<EOF
-#line 2263 "configure"
+#line 2265 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -2295,7 +2297,7 @@ if test "$cross_compiling" = yes; then
   SQUID_UDP_SO_RCVBUF=8192
 else
 cat > conftest.$ac_ext <<EOF
-#line 2299 "configure"
+#line 2301 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -2331,7 +2333,7 @@ if test "$cross_compiling" = yes; then
   SQUID_TCP_SO_SNDBUF=8192
 else
 cat > conftest.$ac_ext <<EOF
-#line 2335 "configure"
+#line 2337 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -2367,7 +2369,7 @@ if test "$cross_compiling" = yes; then
   SQUID_TCP_SO_RCVBUF=8192
 else
 cat > conftest.$ac_ext <<EOF
-#line 2371 "configure"
+#line 2373 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -2400,7 +2402,7 @@ EOF
 
 echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6
 cat > conftest.$ac_ext <<EOF
-#line 2404 "configure"
+#line 2406 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() { return 0; }
index be5224289cca1f9f53dff97de60838cb8a743325..5899003789acf48ac4511026f61af4232d9764ae 100644 (file)
@@ -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.24 1996/07/20 03:39:39 wessels Exp $
+dnl  $Id: configure.in,v 1.25 1996/08/12 23:37:21 wessels Exp $
 dnl
 dnl
 dnl
 AC_INIT(src/main.c)
 AC_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.24 $)dnl
+AC_REVISION($Revision: 1.25 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AC_CONFIG_AUX_DIR(aux)
 
@@ -324,6 +324,8 @@ main() {
         i = _NFILE;
 #else
        while((j=open("/dev/null", 0)) > 0) i=j;
+        close(i); close(i-1);
+       i++;
 #endif
        fprintf (fopen("conftestval", "w"), "%d\n", i);
        exit(0);
index d87ea9e70e62ffaad78c13449965467c4e968f04..b340bb2ad7075aba1f7e74d166baa18b63b79c4f 100644 (file)
@@ -1,7 +1,6 @@
 
-
 /*
- * $Id: comm.cc,v 1.51 1996/08/12 23:22:33 wessels Exp $
+ * $Id: comm.cc,v 1.52 1996/08/12 23:37:22 wessels Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -828,7 +827,7 @@ int comm_select(sec, failtime)
 void comm_set_select_handler(fd, type, handler, client_data)
      int fd;
      unsigned int type;
-     int (*handler) ();
+     PF handler;
      void *client_data;
 {
     comm_set_select_handler_plus_timeout(fd, type, handler, client_data, 0);
@@ -837,7 +836,7 @@ void comm_set_select_handler(fd, type, handler, client_data)
 void comm_set_select_handler_plus_timeout(fd, type, handler, client_data, timeout)
      int fd;
      unsigned int type;
-     int (*handler) ();
+     PF handler;
      void *client_data;
      time_t timeout;
 {
@@ -899,7 +898,7 @@ int comm_get_select_handler(fd, type, handler_ptr, client_data_ptr)
 
 void comm_add_close_handler(fd, handler, data)
      int fd;
-     int (*handler) ();
+     PF handler;
      void *data;
 {
     struct close_handler *new = xmalloc(sizeof(*new));
@@ -914,7 +913,7 @@ void comm_add_close_handler(fd, handler, data)
 
 void comm_remove_close_handler(fd, handler, data)
      int fd;
-     int (*handler) ();
+     PF handler;
      void *data;
 {
     struct close_handler *p, *last = NULL;
index 27983307614906c5deccacd30d05f4930bb272d8..e75c195feb7728ad812d6ec7eb0969d87b05e361 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: main.cc,v 1.57 1996/07/27 07:07:43 wessels Exp $
+ * $Id: main.cc,v 1.58 1996/08/12 23:37:24 wessels Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -423,7 +423,6 @@ static void mainInitialize()
     if (first_time) {
        stmemInit();            /* stmem must go before at least redirect */
        disk_init();            /* disk_init must go before ipcache_init() */
-       writePidFile();         /* write PID file */
     }
     ipcache_init();
     fqdncache_init();
@@ -437,7 +436,6 @@ static void mainInitialize()
 #endif
 
     if (first_time) {
-       first_time = 0;
        /* module initialization */
        urlInitialize();
        stat_init(&CacheInfo, Config.Log.access);
@@ -458,12 +456,16 @@ static void mainInitialize()
     if (theOutIcpConnection >= 0 && (!httpd_accel_mode || Config.Accel.withProxy))
        neighbors_open(theOutIcpConnection);
 
+    if (first_time)
+       writePidFile();         /* write PID file */
+
     squid_signal(SIGUSR1, rotate_logs, SA_RESTART);
     squid_signal(SIGUSR2, sigusr2_handle, SA_RESTART);
     squid_signal(SIGHUP, reconfigure, SA_RESTART);
     squid_signal(SIGTERM, shut_down, SA_NODEFER | SA_RESETHAND | SA_RESTART);
     squid_signal(SIGINT, shut_down, SA_NODEFER | SA_RESETHAND | SA_RESTART);
     debug(1, 0, "Ready to serve requests.\n");
+    first_time = 0;
 }
 
 
index 04c59021546a50d55dd0dbb434855af0b6ff1aaa..2ea207170eecaf87a8676b179bfbf2d9ca1e5e02 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: store.cc,v 1.78 1996/08/12 23:22:38 wessels Exp $
+ * $Id: store.cc,v 1.79 1996/08/12 23:37:25 wessels Exp $
  *
  * DEBUG: section 20    Storeage Manager
  * AUTHOR: Harvest Derived
@@ -1824,8 +1824,11 @@ int storeWalkThrough(proc, data)
     int n = 0;
 
     for (e = storeGetFirst(); e; e = storeGetNext()) {
-       if ((++n & 0xFF) == 0)
+       if ((++n & 0xFF) == 0) {
            getCurrentTime();
+           if (shutdown_pending || reread_pending)
+               break;
+       }
        if ((n & 0xFFF) == 0)
            debug(20, 2, "storeWalkThrough: %7d objects so far.\n", n);
        count += proc(e, data);
index ded138f28c5371d4a8318227601524f43ebed350..12aebe6b8884876acaf7899663ad236806e89795 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: url.cc,v 1.28 1996/08/12 23:22:39 wessels Exp $
+ * $Id: url.cc,v 1.29 1996/08/12 23:37:25 wessels Exp $
  *
  * DEBUG: section 23    URL Parsing
  * AUTHOR: Duane Wessels
@@ -199,6 +199,10 @@ request_t *urlParse(method, url)
     protocol_t protocol = PROTO_NONE;
     proto[0] = host[0] = urlpath[0] = login[0] = '\0';
 
+    if (strlen(url) > MAX_URL) {
+       debug(23, 0, "urlParse: URL too large (%d bytes)\n", strlen(url));
+       return NULL;
+    }
     if (method == METHOD_CONNECT) {
        port = CONNECT_PORT;
        if (sscanf(url, "%[^:]:%d", host, &port) < 1)