]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
2_0 branch merge
authorwessels <>
Fri, 9 Oct 1998 02:10:09 +0000 (02:10 +0000)
committerwessels <>
Fri, 9 Oct 1998 02:10:09 +0000 (02:10 +0000)
ChangeLog
lib/hash.c
src/StatHist.cc
src/cf.data.pre
src/client_side.cc
src/comm.cc
src/htcp.cc
src/store.cc

index da841a2c9a2f28573ea1d230ddaa46b0d414a9a1..d8a35918f7dda0aeb825d507d1d749d14712c421 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -55,6 +55,10 @@ Changes to Squid-2.0 (October 2, 1998):
        - Fixed ncsa_auth hash bugs when re-reading password file.
        - Changed clientHierarchical() so that by default SSL/CONNECT
          requests do NOT go to neighbor caches.
+       - Changed clientHandleIMSReply() to not call storeAbort()
+         because there can be more than one client hanging on the
+         StoreEntry.  This hopefully fixes "store_status !=
+         STORE_ABORTED" assertions.
 
 Changes to squid-1.2.beta25 (September 21, 1998):
 
index 9f257a721c7377b7b7296e6f68e39b47ead1c8b8..abd0d95f366cbabb6881fd51339137c461c16821 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: hash.c,v 1.5 1998/09/23 20:45:10 wessels Exp $
+ * $Id: hash.c,v 1.6 1998/10/08 20:10:13 wessels Exp $
  *
  * DEBUG: section 0     Hash Tables
  * AUTHOR: Harvest Derived
@@ -335,10 +335,10 @@ hashPrime(int n)
     int I = sizeof(hash_primes) / sizeof(int);
     int i;
     int best_prime = hash_primes[0];
-    double min = fabs(log(n) - log(hash_primes[0]));
+    double min = fabs(log((double) n) - log((double) hash_primes[0]));
     double d;
     for (i = 0; i < I; i++) {
-       d = fabs(log(n) - log(hash_primes[i]));
+       d = fabs(log((double) n) - log((double) hash_primes[i]));
        if (d > min)
            continue;
        min = d;
index 990364c335e9e39e2f9061ed7042b8399117397b..cc84144a6da16d7fb2543cd56f5aaaf599c1a700 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StatHist.cc,v 1.14 1998/10/08 02:40:04 wessels Exp $
+ * $Id: StatHist.cc,v 1.15 1998/10/08 20:10:14 wessels Exp $
  *
  * DEBUG: section 62    Generic Histogram
  * AUTHOR: Duane Wessels
@@ -243,7 +243,7 @@ Null(double x)
 void
 statHistEnumInit(StatHist * H, int last_enum)
 {
-    statHistInit(H, last_enum + 3, &Null, &Null, -1, last_enum + 1 + 1);
+    statHistInit(H, last_enum + 3, &Null, &Null, (double) -1, (double) (last_enum + 1 + 1));
 }
 
 void
index 8ba71f669194510b57014dbc94998cf19c7e70db..043e3924cd7fec0f097788c8e8a51253eb1a6535 100644 (file)
@@ -1,6 +1,6 @@
 
 #
-# $Id: cf.data.pre,v 1.116 1998/09/30 02:53:20 wessels Exp $
+# $Id: cf.data.pre,v 1.117 1998/10/08 20:10:15 wessels Exp $
 #
 #
 # SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -1362,8 +1362,8 @@ DOC_START
          # example for routing all requests for AS#1241 and only 
          # those to mycache.mydomain.net:
          # acl asexample dst_as 1241
-         # cache_peer_access allow mycache.mydomain.net asexample
-         # cache_peer_access deny mycache_mydomain.net all
+         # cache_peer_access mycache.mydomain.net allow asexample
+         # cache_peer_access mycache_mydomain.net deny all
 
        acl aclname proxy_auth [ refresh ]
          # Use an EXTERNAL authentication program to check username/password
index 27d735d2bb20f5c22f70386252f73388c19ccfda..d65a08a3a4a27ba6bec8309b95fed0aed16063d4 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.407 1998/10/08 02:40:05 wessels Exp $
+ * $Id: client_side.cc,v 1.408 1998/10/08 20:10:17 wessels Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -340,7 +340,37 @@ clientHandleIMSReply(void *data, char *buf, ssize_t size)
     const http_status status = mem->reply->sline.status;
     debug(33, 3) ("clientHandleIMSReply: %s, %d bytes\n", url, (int) size);
     if (size < 0 && entry->store_status != STORE_ABORTED)
+#if OLD_CODE
+       /*
+        * This storeAbort() call causes wrong behaviour in some situations.
+        * If there are multiple clients hanging on this entry, the second
+        * client will not want the entry to be aborted.  This shows up in
+        * the stack trace below:
+        *
+        * #0  0xef5f452c in kill ()
+        * #1  0xef5ba620 in abort ()
+        * #2  0x7d680 in __eprintf (string=0x82a70 "%s:%u: failed assertion `%s'\n", expression=0x82a90 "client_side.c", line=1111, filename=0x83468 "size > 0")
+        * #3  0x2ad7c in clientCacheHit (data=0x31ae318, buf=0x17f1450 "", size=0) at client_side.c:1111
+        * #4  0x65cd4 in storeClientCopy2 (e=0x4c48c0, sc=0x2eedd70) at store_client.c:264
+        * #5  0x665b0 in InvokeHandlers (e=0x4c48c0) at store_client.c:510
+        * #6  0x63c90 in storeAbort (e=0x4c48c0, cbflag=1) at store.c:626
+        * #7  0x29190 in clientHandleIMSReply (data=0x31e9518, buf=0x2268810 "", size=-1) at client_side.c:343
+        * #8  0x66450 in storeUnregister (e=0x2910c, data=0x31e9518) at store_client.c:467
+        * #9  0x29a54 in httpRequestFree (data=0x31e9518) at client_side.c:579
+        * #10 0x29eb4 in connStateFree (fd=534528, data=0x314d0d0) at client_side.c:667
+        * #11 0x2f27c in commCallCloseHandlers (fd=42) at comm.c:501
+        * #12 0x2f410 in comm_close (fd=42) at comm.c:565
+        * #13 0x2d054 in clientReadRequest (fd=42, data=0x314d0d0) at client_side.c:2038
+        * #14 0x309c8 in comm_poll (msec=434) at comm_select.c:354
+        * #15 0x4da64 in main (argc=5, argv=0xeffffd4c) at main.c:587
+        */
        storeAbort(entry, 1);
+#endif
+       /*
+        * Lets just try to return here and see what kind of problems that
+        * causes
+        */
+       return;
     if (entry->store_status == STORE_ABORTED) {
        debug(33, 3) ("clientHandleIMSReply: ABORTED '%s'\n", url);
        /* We have an existing entry, but failed to validate it */
@@ -1619,10 +1649,12 @@ clientProcessRequest2(clientHttpRequest * http)
     if (NULL == e) {
        /* this object isn't in the cache */
        return LOG_TCP_MISS;
-    } else if (Config.onoff.offline) {
+    }
+    if (Config.onoff.offline) {
        http->entry = e;
        return LOG_TCP_HIT;
-    } else if (!storeEntryValidToSend(e)) {
+    }
+    if (!storeEntryValidToSend(e)) {
        http->entry = NULL;
        return LOG_TCP_MISS;
     }
index eec94c1f656f1efa18144983a3680b8394c9b5ef..2c63f75a2f648ce4422c00647cd0bc3387e912bf 100644 (file)
@@ -1,7 +1,6 @@
 
-
 /*
- * $Id: comm.cc,v 1.288 1998/10/08 02:40:06 wessels Exp $
+ * $Id: comm.cc,v 1.289 1998/10/08 20:10:19 wessels Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
index d3a953cf8b0dbe0335d525dfeec6bfad352dbd9c..bde07fd43d08163479889895b8a9044609492c0a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: htcp.cc,v 1.25 1998/09/23 17:06:59 wessels Exp $
+ * $Id: htcp.cc,v 1.26 1998/10/08 20:10:21 wessels Exp $
  *
  * DEBUG: section 31    Hypertext Caching Protocol
  * AUTHOR: Duane Wesssels
@@ -188,14 +188,14 @@ htcpHexdump(const char *tag, const char *s, int sz)
     int i;
     int k;
     char hex[80];
-    debug(31, 1) ("htcpHexdump %s\n", tag);
+    debug(31, 3) ("htcpHexdump %s\n", tag);
     memset(hex, '\0', 80);
     for (i = 0; i < sz; i++) {
        k = i % 16;
        snprintf(&hex[k * 3], 4, " %02x", (int) *(s + i));
        if (k < 15 && i < (sz - 1))
            continue;
-       debug(31, 1) ("\t%s\n", hex);
+       debug(31, 3) ("\t%s\n", hex);
        memset(hex, '\0', 80);
     }
 #endif
@@ -230,8 +230,8 @@ htcpBuildCountstr(char *buf, size_t buflen, const char *s)
        len = strlen(s);
     else
        len = 0;
-    debug(31, 1) ("htcpBuildCountstr: LENGTH = %d\n", len);
-    debug(31, 1) ("htcpBuildCountstr: TEXT = {%s}\n", s);
+    debug(31, 3) ("htcpBuildCountstr: LENGTH = %d\n", len);
+    debug(31, 3) ("htcpBuildCountstr: TEXT = {%s}\n", s ? s : "<NULL>");
     length = htons((u_short) len);
     xmemcpy(buf + off, &length, 2);
     off += 2;
@@ -264,7 +264,7 @@ htcpBuildSpecifier(char *buf, size_t buflen, htcpStuff * stuff)
     if (s < 0)
        return s;
     off += s;
-    debug(31, 1) ("htcpBuildSpecifier: size %d\n", (int) off);
+    debug(31, 3) ("htcpBuildSpecifier: size %d\n", (int) off);
     return off;
 }
 
@@ -293,11 +293,11 @@ htcpBuildTstOpData(char *buf, size_t buflen, htcpStuff * stuff)
 {
     switch (stuff->rr) {
     case RR_REQUEST:
-       debug(31, 1) ("htcpBuildTstOpData: RR_REQUEST\n");
+       debug(31, 3) ("htcpBuildTstOpData: RR_REQUEST\n");
        return htcpBuildSpecifier(buf, buflen, stuff);
     case RR_RESPONSE:
-       debug(31, 1) ("htcpBuildTstOpData: RR_RESPONSE\n");
-       debug(31, 1) ("htcpBuildTstOpData: F1 = %d\n", stuff->f1);
+       debug(31, 3) ("htcpBuildTstOpData: RR_RESPONSE\n");
+       debug(31, 3) ("htcpBuildTstOpData: F1 = %d\n", stuff->f1);
        if (stuff->f1)          /* cache miss */
            return 0;
        else                    /* cache hit */
@@ -312,7 +312,7 @@ static ssize_t
 htcpBuildOpData(char *buf, size_t buflen, htcpStuff * stuff)
 {
     ssize_t off = 0;
-    debug(31, 1) ("htcpBuildOpData: opcode %s\n",
+    debug(31, 3) ("htcpBuildOpData: opcode %s\n",
        htcpOpcodeStr[stuff->op]);
     switch (stuff->op) {
     case HTCP_TST:
@@ -339,7 +339,7 @@ htcpBuildData(char *buf, size_t buflen, htcpStuff * stuff)
     if (op_data_sz < 0)
        return op_data_sz;
     off += op_data_sz;
-    debug(31, 1) ("htcpBuildData: hdr.length = %d\n", (int) off);
+    debug(31, 3) ("htcpBuildData: hdr.length = %d\n", (int) off);
     hdr.length = (u_short) off;
     hdr.opcode = stuff->op;
     hdr.response = stuff->response;
@@ -350,7 +350,7 @@ htcpBuildData(char *buf, size_t buflen, htcpStuff * stuff)
     hdr.length = htons(hdr.length);
     hdr.msg_id = htonl(hdr.msg_id);
     xmemcpy(buf, &hdr, hdr_sz);
-    debug(31, 1) ("htcpBuildData: size %d\n", (int) off);
+    debug(31, 3) ("htcpBuildData: size %d\n", (int) off);
     return off;
 }
 
@@ -380,7 +380,7 @@ htcpBuildPacket(htcpStuff * stuff, ssize_t * len)
     hdr.minor = 0;
     xmemcpy(buf, &hdr, hdr_sz);
     *len = off;
-    debug(31, 1) ("htcpBuildPacket: size %d\n", (int) off);
+    debug(31, 3) ("htcpBuildPacket: size %d\n", (int) off);
     return buf;
 }
 
@@ -388,7 +388,7 @@ static void
 htcpSend(const char *buf, int len, struct sockaddr_in *to)
 {
     int x;
-    debug(31, 1) ("htcpSend: %s/%d\n",
+    debug(31, 3) ("htcpSend: %s/%d\n",
        inet_ntoa(to->sin_addr), (int) ntohs(to->sin_port));
     htcpHexdump("htcpSend", buf, len);
     x = comm_udp_sendto(htcpOutSocket,
@@ -427,9 +427,9 @@ static int
 htcpUnpackCountstr(char *buf, int sz, char **str)
 {
     u_short l;
-    debug(31, 1) ("htcpUnpackCountstr: sz = %d\n", sz);
+    debug(31, 3) ("htcpUnpackCountstr: sz = %d\n", sz);
     if (sz < 2) {
-       debug(31, 1) ("htcpUnpackCountstr: sz < 2\n");
+       debug(31, 3) ("htcpUnpackCountstr: sz < 2\n");
        return -1;
     }
     htcpHexdump("htcpUnpackCountstr", buf, sz);
@@ -437,15 +437,15 @@ htcpUnpackCountstr(char *buf, int sz, char **str)
     l = ntohs(l);
     buf += 2;
     sz -= 2;
-    debug(31, 1) ("htcpUnpackCountstr: LENGTH = %d\n", (int) l);
+    debug(31, 3) ("htcpUnpackCountstr: LENGTH = %d\n", (int) l);
     if (sz < l) {
-       debug(31, 1) ("htcpUnpackCountstr: sz(%d) < l(%d)\n", sz, l);
+       debug(31, 3) ("htcpUnpackCountstr: sz(%d) < l(%d)\n", sz, l);
        return -1;
     }
     if (str) {
        *str = xmalloc(l + 1);
        xstrncpy(*str, buf, l + 1);
-       debug(31, 1) ("htcpUnpackCountstr: TEXT = {%s}\n", *str);
+       debug(31, 3) ("htcpUnpackCountstr: TEXT = {%s}\n", *str);
     }
     return (int) l + 2;
 }
@@ -455,7 +455,7 @@ htcpUnpackSpecifier(char *buf, int sz)
 {
     htcpSpecifier *s = xcalloc(1, sizeof(htcpSpecifier));
     int o;
-    debug(31, 1) ("htcpUnpackSpecifier: %d bytes\n", (int) sz);
+    debug(31, 3) ("htcpUnpackSpecifier: %d bytes\n", (int) sz);
     o = htcpUnpackCountstr(buf, sz, &s->method);
     if (o < 0) {
        debug(31, 1) ("htcpUnpackSpecifier: failed to unpack METHOD\n");
@@ -488,7 +488,7 @@ htcpUnpackSpecifier(char *buf, int sz)
     }
     buf += o;
     sz -= o;
-    debug(31, 1) ("htcpUnpackSpecifier: %d bytes left\n", sz);
+    debug(31, 3) ("htcpUnpackSpecifier: %d bytes left\n", sz);
     return s;
 }
 
@@ -497,7 +497,7 @@ htcpUnpackDetail(char *buf, int sz)
 {
     htcpDetail *d = xcalloc(1, sizeof(htcpDetail));
     int o;
-    debug(31, 1) ("htcpUnpackDetail: %d bytes\n", (int) sz);
+    debug(31, 3) ("htcpUnpackDetail: %d bytes\n", (int) sz);
     o = htcpUnpackCountstr(buf, sz, &d->resp_hdrs);
     if (o < 0) {
        debug(31, 1) ("htcpUnpackDetail: failed to unpack RESP_HDRS\n");
@@ -522,7 +522,7 @@ htcpUnpackDetail(char *buf, int sz)
     }
     buf += o;
     sz -= o;
-    debug(31, 1) ("htcpUnpackDetail: %d bytes left\n", sz);
+    debug(31, 3) ("htcpUnpackDetail: %d bytes left\n", sz);
     return d;
 }
 
@@ -558,7 +558,7 @@ htcpTstReply(htcpDataHeader * dhdr, StoreEntry * e, htcpSpecifier * spec, struct
            squid_curtime - e->timestamp : 0);
        httpHeaderPackInto(&hdr, &p);
        stuff.D.resp_hdrs = xstrdup(mb.buf);
-       debug(31, 1) ("htcpTstReply: resp_hdrs = {%s}\n", stuff.D.resp_hdrs);
+       debug(31, 3) ("htcpTstReply: resp_hdrs = {%s}\n", stuff.D.resp_hdrs);
        memBufReset(&mb);
        httpHeaderReset(&hdr);
        if (e->expires > -1)
@@ -567,7 +567,7 @@ htcpTstReply(htcpDataHeader * dhdr, StoreEntry * e, htcpSpecifier * spec, struct
            httpHeaderPutTime(&hdr, HDR_LAST_MODIFIED, e->lastmod);
        httpHeaderPackInto(&hdr, &p);
        stuff.D.entity_hdrs = xstrdup(mb.buf);
-       debug(31, 1) ("htcpTstReply: entity_hdrs = {%s}\n", stuff.D.entity_hdrs);
+       debug(31, 3) ("htcpTstReply: entity_hdrs = {%s}\n", stuff.D.entity_hdrs);
        memBufReset(&mb);
        httpHeaderReset(&hdr);
        if ((host = urlHostname(spec->uri))) {
@@ -580,7 +580,7 @@ htcpTstReply(htcpDataHeader * dhdr, StoreEntry * e, htcpSpecifier * spec, struct
        }
        httpHeaderPackInto(&hdr, &p);
        stuff.D.cache_hdrs = xstrdup(mb.buf);
-       debug(31, 1) ("htcpTstReply: cache_hdrs = {%s}\n", stuff.D.cache_hdrs);
+       debug(31, 3) ("htcpTstReply: cache_hdrs = {%s}\n", stuff.D.cache_hdrs);
        memBufClean(&mb);
        httpHeaderClean(&hdr);
        packerClean(&p);
@@ -597,13 +597,13 @@ htcpTstReply(htcpDataHeader * dhdr, StoreEntry * e, htcpSpecifier * spec, struct
 static void
 htcpHandleNop(htcpDataHeader * hdr, char *buf, int sz, struct sockaddr_in *from)
 {
-    debug(31, 1) ("htcpHandleNop: Unimplemented\n");
+    debug(31, 3) ("htcpHandleNop: Unimplemented\n");
 }
 
 static void
 htcpHandleTst(htcpDataHeader * hdr, char *buf, int sz, struct sockaddr_in *from)
 {
-    debug(31, 1) ("htcpHandleTst: sz = %d\n", (int) sz);
+    debug(31, 3) ("htcpHandleTst: sz = %d\n", (int) sz);
     if (hdr->RR == RR_REQUEST)
        htcpHandleTstRequest(hdr, buf, sz, from);
     else
@@ -624,12 +624,12 @@ htcpHandleTstResponse(htcpDataHeader * hdr, char *buf, int sz, struct sockaddr_i
     memset(&htcpReply, '\0', sizeof(htcpReply));
     httpHeaderInit(&htcpReply.hdr, hoHtcpReply);
     htcpReply.msg_id = hdr->msg_id;
-    debug(31, 1) ("htcpHandleTstResponse: msg_id = %d\n", (int) htcpReply.msg_id);
+    debug(31, 3) ("htcpHandleTstResponse: msg_id = %d\n", (int) htcpReply.msg_id);
     htcpReply.hit = hdr->response ? 0 : 1;
     if (hdr->F1) {
-       debug(31, 1) ("htcpHandleTstResponse: MISS\n");
+       debug(31, 3) ("htcpHandleTstResponse: MISS\n");
     } else {
-       debug(31, 1) ("htcpHandleTstResponse: HIT\n");
+       debug(31, 3) ("htcpHandleTstResponse: HIT\n");
        d = htcpUnpackDetail(buf, sz);
        if (d == NULL) {
            debug(31, 1) ("htcpHandleTstResponse: bad DETAIL\n");
@@ -643,7 +643,7 @@ htcpHandleTstResponse(htcpDataHeader * hdr, char *buf, int sz, struct sockaddr_i
            httpHeaderParse(&htcpReply.hdr, t, t + strlen(t));
     }
     key = queried_keys[htcpReply.msg_id % N_QUERIED_KEYS];
-    debug(31, 1) ("htcpHandleTstResponse: key (%p) %s\n", key, storeKeyText(key));
+    debug(31, 3) ("htcpHandleTstResponse: key (%p) %s\n", key, storeKeyText(key));
     neighborsHtcpReply(key, &htcpReply, from);
     if (d)
        htcpFreeDetail(d);
@@ -657,22 +657,22 @@ htcpHandleTstRequest(htcpDataHeader * dhdr, char *buf, int sz, struct sockaddr_i
     StoreEntry *e;
     method_t m;
     if (sz == 0) {
-       debug(31, 1) ("htcpHandleTst: nothing to do\n");
+       debug(31, 3) ("htcpHandleTst: nothing to do\n");
        return;
     }
     if (dhdr->F1 == 0)
        return;
     s = htcpUnpackSpecifier(buf, sz);
     if (NULL == s) {
-       debug(31, 1) ("htcpHandleTstRequest: htcpUnpackSpecifier failed\n");
+       debug(31, 3) ("htcpHandleTstRequest: htcpUnpackSpecifier failed\n");
        return;
     }
-    debug(31, 1) ("htcpHandleTstRequest: %s %s %s\n",
+    debug(31, 3) ("htcpHandleTstRequest: %s %s %s\n",
        s->method,
        s->uri,
        s->version);
     m = urlParseMethod(s->method);
-    debug(31, 1) ("htcpHandleTstRequest: %s\n", s->req_hdrs);
+    debug(31, 3) ("htcpHandleTstRequest: %s\n", s->req_hdrs);
     e = storeGetPublic(s->uri, m);
     if (NULL == e) {
        /* cache miss */
@@ -692,13 +692,13 @@ htcpHandleTstRequest(htcpDataHeader * dhdr, char *buf, int sz, struct sockaddr_i
 static void
 htcpHandleMon(htcpDataHeader * hdr, char *buf, int sz, struct sockaddr_in *from)
 {
-    debug(31, 1) ("htcpHandleMon: Unimplemented\n");
+    debug(31, 3) ("htcpHandleMon: Unimplemented\n");
 }
 
 static void
 htcpHandleSet(htcpDataHeader * hdr, char *buf, int sz, struct sockaddr_in *from)
 {
-    debug(31, 1) ("htcpHandleSet: Unimplemented\n");
+    debug(31, 3) ("htcpHandleSet: Unimplemented\n");
 }
 
 static void
@@ -712,19 +712,19 @@ htcpHandleData(char *buf, int sz, struct sockaddr_in *from)
     xmemcpy(&hdr, buf, sizeof(htcpDataHeader));
     hdr.length = ntohs(hdr.length);
     hdr.msg_id = ntohl(hdr.msg_id);
-    debug(31, 1) ("htcpHandleData: sz = %d\n", sz);
-    debug(31, 1) ("htcpHandleData: length = %d\n", (int) hdr.length);
+    debug(31, 3) ("htcpHandleData: sz = %d\n", sz);
+    debug(31, 3) ("htcpHandleData: length = %d\n", (int) hdr.length);
     if (hdr.opcode > HTCP_END) {
        debug(31, 0) ("htcpHandleData: opcode %d out of range\n",
            (int) hdr.opcode);
        return;
     }
-    debug(31, 1) ("htcpHandleData: opcode = %d %s\n",
+    debug(31, 3) ("htcpHandleData: opcode = %d %s\n",
        (int) hdr.opcode, htcpOpcodeStr[hdr.opcode]);
-    debug(31, 1) ("htcpHandleData: response = %d\n", (int) hdr.response);
-    debug(31, 1) ("htcpHandleData: F1 = %d\n", (int) hdr.F1);
-    debug(31, 1) ("htcpHandleData: RR = %d\n", (int) hdr.RR);
-    debug(31, 1) ("htcpHandleData: msg_id = %d\n", (int) hdr.msg_id);
+    debug(31, 3) ("htcpHandleData: response = %d\n", (int) hdr.response);
+    debug(31, 3) ("htcpHandleData: F1 = %d\n", (int) hdr.F1);
+    debug(31, 3) ("htcpHandleData: RR = %d\n", (int) hdr.RR);
+    debug(31, 3) ("htcpHandleData: msg_id = %d\n", (int) hdr.msg_id);
     if (sz < hdr.length) {
        debug(31, 0) ("htcpHandle: sz < hdr.length\n");
        return;
@@ -736,7 +736,7 @@ htcpHandleData(char *buf, int sz, struct sockaddr_in *from)
     sz = (int) hdr.length;
     buf += sizeof(htcpDataHeader);
     sz -= sizeof(htcpDataHeader);
-    debug(31, 1) ("htcpHandleData: sz = %d\n", sz);
+    debug(31, 3) ("htcpHandleData: sz = %d\n", sz);
     htcpHexdump("htcpHandleData", buf, sz);
     switch (hdr.opcode) {
     case HTCP_NOP:
@@ -768,9 +768,9 @@ htcpHandle(char *buf, int sz, struct sockaddr_in *from)
     htcpHexdump("htcpHandle", buf, sz);
     xmemcpy(&htcpHdr, buf, sizeof(htcpHeader));
     htcpHdr.length = ntohs(htcpHdr.length);
-    debug(31, 1) ("htcpHandle: htcpHdr.length = %d\n", (int) htcpHdr.length);
-    debug(31, 1) ("htcpHandle: htcpHdr.major = %d\n", (int) htcpHdr.major);
-    debug(31, 1) ("htcpHandle: htcpHdr.minor = %d\n", (int) htcpHdr.minor);
+    debug(31, 3) ("htcpHandle: htcpHdr.length = %d\n", (int) htcpHdr.length);
+    debug(31, 3) ("htcpHandle: htcpHdr.major = %d\n", (int) htcpHdr.major);
+    debug(31, 3) ("htcpHandle: htcpHdr.minor = %d\n", (int) htcpHdr.minor);
     if (sz != htcpHdr.length) {
        debug(31, 0) ("htcpHandle: sz != htcpHdr.length\n");
        return;
@@ -790,7 +790,7 @@ htcpRecv(int fd, void *data)
     memset(&from, '\0', flen);
     Counter.syscalls.sock.recvfroms++;
     len = recvfrom(fd, buf, 8192, 0, (struct sockaddr *) &from, &flen);
-    debug(31, 1) ("htcpRecv: FD %d, %d bytes from %s:%d\n",
+    debug(31, 3) ("htcpRecv: FD %d, %d bytes from %s:%d\n",
        fd, len, inet_ntoa(from.sin_addr), ntohs(from.sin_port));
     htcpHandle(buf, len, &from);
     commSetSelect(fd, COMM_SELECT_READ, htcpRecv, NULL, 0);
@@ -875,7 +875,7 @@ htcpQuery(StoreEntry * e, request_t * req, peer * p)
     htcpSend(pkt, (int) pktlen, &p->in_addr);
     save_key = queried_keys[stuff.msg_id % N_QUERIED_KEYS];
     storeKeyCopy(save_key, e->key);
-    debug(31, 1) ("htcpQuery: key (%p) %s\n", save_key, storeKeyText(save_key));
+    debug(31, 3) ("htcpQuery: key (%p) %s\n", save_key, storeKeyText(save_key));
     xfree(pkt);
 }
 
index 424ebca551fe76aa845d59135277d27d6ef618a8..16fa5911bf98a8b64ecd5ec226844ed5f743d129 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.465 1998/10/03 03:56:56 wessels Exp $
+ * $Id: store.cc,v 1.466 1998/10/08 20:10:24 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager
  * AUTHOR: Harvest Derived
@@ -340,6 +340,9 @@ storeSetPublicKey(StoreEntry * e)
      * the object.  If we're not swapping out, then subsequent
      * store clients won't be able to access object data which has
      * been freed from memory.
+     *
+     * If RELEASE_REQUEST is set, then ENTRY_CACHABLE should not
+     * be set, and storeSetPublicKey() should not be called.
      */
     assert(!EBIT_TEST(e->flags, RELEASE_REQUEST));
     newkey = storeKeyPublic(mem->url, mem->method);