]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
2.2 branch merge
authorwessels <>
Thu, 20 May 1999 01:57:34 +0000 (01:57 +0000)
committerwessels <>
Thu, 20 May 1999 01:57:34 +0000 (01:57 +0000)
14 files changed:
src/acl.cc
src/cf.data.pre
src/client_side.cc
src/delay_pools.cc
src/enums.h
src/forward.cc
src/ftp.cc
src/main.cc
src/peer_select.cc
src/ssl.cc
src/store.cc
src/store_client.cc
src/tools.cc
src/tunnel.cc

index 1f3e5dec35f35f48f4e2a03deb2bf1913d0a817d..20b77d5fd9c06358b3f61ef247accfde72473027 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: acl.cc,v 1.203 1999/05/04 17:40:09 wessels Exp $
+ * $Id: acl.cc,v 1.204 1999/05/19 19:57:34 wessels Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -1353,7 +1353,9 @@ aclMatchAcl(acl * ae, aclCheck_t * checklist)
        return aclMatchRegex(ae->data, checklist->browser);
        /* NOTREACHED */
     case ACL_PROXY_AUTH:
-       if (!r->flags.accelerated) {
+       if (NULL == r) {
+           return -1;
+       } else if (!r->flags.accelerated) {
            /* Proxy authorization on proxy requests */
            header = httpHeaderGetStr(&checklist->request->header,
                HDR_PROXY_AUTHORIZATION);
index b4f847f8207f8283972154456b19fd2822cc8c85..83a99d01750c62066c3a2162259af38bf32d65ca 100644 (file)
@@ -1,6 +1,6 @@
 
 #
-# $Id: cf.data.pre,v 1.154 1999/05/12 16:35:57 wessels Exp $
+# $Id: cf.data.pre,v 1.155 1999/05/19 19:57:36 wessels Exp $
 #
 #
 # SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -2514,7 +2514,7 @@ DOC_END
 
 NAME: snmp_incoming_address
 TYPE: address
-LOC: Config.Addrs.snmp_outgoing
+LOC: Config.Addrs.snmp_incoming
 DEFAULT: 0.0.0.0
 IFDEF: SQUID_SNMP
 DOC_NONE
index bceb23e6ee44639d92d0ccf0fcd41a4e631cb69d..355d8d1c2d374bd847f986d6d36d6e87d577b173 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.455 1999/05/11 18:51:47 wessels Exp $
+ * $Id: client_side.cc,v 1.456 1999/05/19 19:57:39 wessels Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -1336,6 +1336,7 @@ clientCacheHit(void *data, char *buf, ssize_t size)
            debug(33, 4) ("clientCacheHit: Reply code %d != 200\n",
                mem->reply->sline.status);
            memFree(buf, MEM_CLIENT_SOCK_BUF);
+           http->log_type = LOG_TCP_MISS;
            clientProcessMiss(http);
        } else if (modifiedSince(e, http->request)) {
            http->log_type = LOG_TCP_IMS_HIT;
index 5dfd9a3b00accfd9ac49beb68dcf77329e86411a..6a6ded583ada0012e1262abab139ce5019996cba 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: delay_pools.cc,v 1.9 1999/05/04 21:58:20 wessels Exp $
+ * $Id: delay_pools.cc,v 1.10 1999/05/19 19:57:41 wessels Exp $
  *
  * DEBUG: section 77    Delay Pools
  * AUTHOR: David Luyer <luyer@ucs.uwa.edu.au>
@@ -165,6 +165,8 @@ delayRegisterDelayIdPtr(delay_id * loc)
     hash_link *lnk;
     if (!delay_id_ptr_hash)
        return;
+    if (*loc == 0)
+       return;
     lnk = xmalloc(sizeof(hash_link));
     lnk->key = (char *) loc;
     hash_join(delay_id_ptr_hash, lnk);
@@ -627,6 +629,7 @@ delaySetStoreClient(StoreEntry * e, void *data, delay_id delay_id)
     store_client *sc = storeClientListSearch(e->mem_obj, data);
     assert(sc != NULL);
     sc->delay_id = delay_id;
+    delayRegisterDelayIdPtr(&sc->delay_id);
 }
 
 static void
index 36d6297cdfc6ff9b028bae13b0ad3e767b64b697..b16b64be86b97b35abb90006a2f28bfc74ec9e82 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: enums.h,v 1.151 1999/05/10 19:33:23 wessels Exp $
+ * $Id: enums.h,v 1.152 1999/05/19 19:57:42 wessels Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -335,7 +335,6 @@ enum {
 enum {
     PING_NONE,
     PING_WAITING,
-    PING_TIMEOUT,
     PING_DONE
 };
 
index fde59897cf19258b978c5369e50ab59fd3285e26..705d294aac3c8da5a41f7e8b2250b9015a531b50 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: forward.cc,v 1.59 1999/05/04 20:58:31 wessels Exp $
+ * $Id: forward.cc,v 1.60 1999/05/19 19:57:43 wessels Exp $
  *
  * DEBUG: section 17    Request Forwarding
  * AUTHOR: Duane Wessels
@@ -462,10 +462,12 @@ fwdCheckDeferRead(int fd, void *data)
     if (mem == NULL)
        return 0;
 #if DELAY_POOLS
-    if (fd > -1)
-       if (!delayIsNoDelay(fd))
-           if (delayMostBytesWanted(mem, 1) == 0)
-               return 1;
+    if (fd < 0)
+       (void) 0;
+    else if (delayIsNoDelay(fd))
+       (void) 0;
+    else if (delayMostBytesWanted(mem, 1) == 0)
+       return 1;
 #endif
     if (EBIT_TEST(e->flags, ENTRY_FWD_HDR_WAIT))
        return 0;
index 37c6a389e311fbd6ae53d4467935b3093342a867..e1ca9eca5e4402cc1e559c43d07f05f587523420 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.284 1999/05/11 20:14:14 wessels Exp $
+ * $Id: ftp.cc,v 1.285 1999/05/19 19:57:45 wessels Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -60,24 +60,24 @@ typedef enum {
 } ftp_state_t;
 
 struct _ftp_flags {
-    int isdir:1;
-    int pasv_supported:1;
-    int skip_whitespace:1;
-    int rest_supported:1;
-    int pasv_only:1;
-    int authenticated:1;
-    int http_header_sent:1;
-    int tried_nlst:1;
-    int use_base:1;
-    int root_dir:1;
-    int no_dotdot:1;
-    int html_header_sent:1;
-    int binary:1;
-    int try_slash_hack:1;
-    int put:1;
-    int put_mkdir:1;
-    int listformat_unknown:1;
-    int datachannel_hack:1;
+    unsigned int isdir:1;
+    unsigned int pasv_supported:1;
+    unsigned int skip_whitespace:1;
+    unsigned int rest_supported:1;
+    unsigned int pasv_only:1;
+    unsigned int authenticated:1;
+    unsigned int http_header_sent:1;
+    unsigned int tried_nlst:1;
+    unsigned int use_base:1;
+    unsigned int root_dir:1;
+    unsigned int no_dotdot:1;
+    unsigned int html_header_sent:1;
+    unsigned int binary:1;
+    unsigned int try_slash_hack:1;
+    unsigned int put:1;
+    unsigned int put_mkdir:1;
+    unsigned int listformat_unknown:1;
+    unsigned int datachannel_hack:1;
 };
 
 typedef struct _Ftpdata {
@@ -265,13 +265,23 @@ ftpStateFree(int fdnotused, void *data)
     storeUnlockObject(ftpState->entry);
     if (ftpState->reply_hdr) {
        memFree(ftpState->reply_hdr, MEM_8K_BUF);
+       /* this seems unnecessary, but people report SEGV's
+        * when freeing memory in this function */
        ftpState->reply_hdr = NULL;
     }
     requestUnlink(ftpState->request);
-    if (ftpState->ctrl.buf)
+    if (ftpState->ctrl.buf) {
        ftpState->ctrl.freefunc(ftpState->ctrl.buf);
-    if (ftpState->data.buf)
+       /* this seems unnecessary, but people report SEGV's
+        * when freeing memory in this function */
+       ftpState->ctrl.buf = NULL;
+    }
+    if (ftpState->data.buf) {
        ftpState->data.freefunc(ftpState->data.buf);
+       /* this seems unnecessary, but people report SEGV's
+        * when freeing memory in this function */
+       ftpState->data.buf = NULL;
+    }
     if (ftpState->pathcomps)
        wordlistDestroy(&ftpState->pathcomps);
     if (ftpState->ctrl.message)
index c019ace8eda26689665b483cc0b8694f97ccd393..e6b9964614df157436d5f6be4cc1a33e86b107a5 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: main.cc,v 1.298 1999/05/04 21:58:25 wessels Exp $
+ * $Id: main.cc,v 1.299 1999/05/19 19:57:47 wessels Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -724,7 +724,9 @@ watch_child(char *argv[])
 #endif
     for (i = 0; i < Squid_MaxFD; i++)
        close(i);
+#if NOT_NEEDED
     umask(0);
+#endif
     for (;;) {
        if ((pid = fork()) == 0) {
            /* child */
index 6707cb20df8a790d298ddae07a7b8f975e808fb6..6a6386fa5b5e0ca02c3d8e0b9afc61b40216d357 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: peer_select.cc,v 1.99 1999/04/23 02:57:28 wessels Exp $
+ * $Id: peer_select.cc,v 1.100 1999/05/19 19:57:49 wessels Exp $
  *
  * DEBUG: section 44    Peer Selection Algorithm
  * AUTHOR: Duane Wessels
@@ -444,9 +444,9 @@ peerPingTimeout(void *data)
     StoreEntry *entry = psstate->entry;
     if (entry)
        debug(44, 3) ("peerPingTimeout: '%s'\n", storeUrl(entry));
-    entry->ping_status = PING_TIMEOUT;
     if (!cbdataValid(psstate->callback_data)) {
        /* request aborted */
+       entry->ping_status = PING_DONE;
        cbdataUnlock(psstate->callback_data);
        peerSelectStateFree(psstate);
        return;
index a23bd8dba919b21ae7e5059b953a11548e805ddd..ae11bd9077914114cefa18d06a55d0e0b20f41fa 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ssl.cc,v 1.95 1999/05/04 21:58:37 wessels Exp $
+ * $Id: ssl.cc,v 1.96 1999/05/19 19:57:50 wessels Exp $
  *
  * DEBUG: section 26    Secure Sockets Layer Proxy
  * AUTHOR: Duane Wessels
@@ -529,8 +529,10 @@ sslPeerSelectComplete(FwdServer * fs, void *data)
     }
 #if DELAY_POOLS
     /* no point using the delayIsNoDelay stuff since ssl is nice and simple */
-    if (g && g->options.no_delay)
+    if (g && g->options.no_delay && sslState->delay_id) {
+       delayUnregisterDelayIdPtr(&sslState->delay_id);
        sslState->delay_id = 0;
+    }
 #endif
     commConnectStart(sslState->server.fd,
        sslState->host,
index d3afcb9e500260cbb04a5b8aac7bcab68e69712c..e8e64f2671b8821bd85124b60e06818d648c2fe6 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.498 1999/05/04 21:58:40 wessels Exp $
+ * $Id: store.cc,v 1.499 1999/05/19 19:57:53 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager
  * AUTHOR: Harvest Derived
@@ -49,7 +49,6 @@ const char *pingStatusStr[] =
 {
     "PING_NONE",
     "PING_WAITING",
-    "PING_TIMEOUT",
     "PING_DONE"
 };
 
index b6f61921b85153f275e138db48caab1feb7cfb7e..655fa153d0fbf12790df68e9ae03a731d75a6d61 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_client.cc,v 1.67 1999/05/04 21:58:42 wessels Exp $
+ * $Id: store_client.cc,v 1.68 1999/05/19 19:57:54 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager Client-Side Interface
  * AUTHOR: Duane Wessels
@@ -132,7 +132,6 @@ storeClientListAdd(StoreEntry * e, void *data)
     *T = sc;
 #if DELAY_POOLS
     sc->delay_id = 0;
-    delayRegisterDelayIdPtr(&sc->delay_id);
 #endif
 }
 
index fb5f59a89fc079e27a8f9cd04e00888426fb7afa..06f1184081ea59903dc1578342e6da3fac5e9232 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tools.cc,v 1.178 1999/05/04 21:58:45 wessels Exp $
+ * $Id: tools.cc,v 1.179 1999/05/19 19:57:56 wessels Exp $
  *
  * DEBUG: section 21    Misc Functions
  * AUTHOR: Harvest Derived
@@ -807,6 +807,8 @@ gb_to_str(const gb_t * g)
     static int call_id = 0;
     double value = gb_to_double(g);
     char *buf = bufs[call_id++];
+    if (call_id >= max_cc_calls)
+       call_id = 0;
     /* select format */
     if (value < 1e9)
        snprintf(buf, sizeof(GbBuf), "%.2f MB", value / 1e6);
index 70a32be65bee73dbf0ab648ed08e65bdf031f16f..c30077f29cf7c8d1385118a60acc9b3f87d8399b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tunnel.cc,v 1.95 1999/05/04 21:58:37 wessels Exp $
+ * $Id: tunnel.cc,v 1.96 1999/05/19 19:57:50 wessels Exp $
  *
  * DEBUG: section 26    Secure Sockets Layer Proxy
  * AUTHOR: Duane Wessels
@@ -529,8 +529,10 @@ sslPeerSelectComplete(FwdServer * fs, void *data)
     }
 #if DELAY_POOLS
     /* no point using the delayIsNoDelay stuff since ssl is nice and simple */
-    if (g && g->options.no_delay)
+    if (g && g->options.no_delay && sslState->delay_id) {
+       delayUnregisterDelayIdPtr(&sslState->delay_id);
        sslState->delay_id = 0;
+    }
 #endif
     commConnectStart(sslState->server.fd,
        sslState->host,