]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Finish LOG_TCP_NEGATIVE_HIT
authorwessels <>
Fri, 24 Oct 1997 09:14:35 +0000 (09:14 +0000)
committerwessels <>
Fri, 24 Oct 1997 09:14:35 +0000 (09:14 +0000)
src/client_side.cc
src/ftp.cc
src/protos.h

index 501bfb18ef48ccb3e85429285ebbfbe849da7d4b..109ced4d8c5de02c1ecb41fa14a4b1a14534fce9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.130 1997/10/21 15:58:43 wessels Exp $
+ * $Id: client_side.cc,v 1.131 1997/10/24 03:14:35 wessels Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -373,3 +373,15 @@ clientPurgeRequest(clientHttpRequest * http)
        strcat(msg, "\r\n");
     comm_write(fd, xstrdup(msg), strlen(msg), clientWriteComplete, http, xfree);
 }
+
+int
+checkNegativeHit(StoreEntry *e)
+{
+       if (!BIT_TEST(e->flag, ENTRY_NEGCACHED))
+           return 0;
+       if (e->expires <= squid_curtime)
+            return 0;
+       if (e->store_status != STORE_OK)
+           return 0;
+       return 1;
+}
index 634c594274151ee4b3dc173dddc4a6ec1a57c384..9de60d67ed698d50008e8f9e7c5acb5049babea7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.147 1997/10/23 20:41:35 wessels Exp $
+ * $Id: ftp.cc,v 1.148 1997/10/24 03:14:37 wessels Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -1473,7 +1473,8 @@ ftpReadTransferDone(FtpStateData * ftpState)
     int code = ftpState->ctrl.replycode;
     debug(9, 3) ("This is ftpReadTransferDone\n");
     if (code != 226) {
-       debug(9, 1) ("Got code %d after reading data, releasing entry\n");
+       debug(9, 1) ("ftpReadTransferDone: Got code %d after reading data\n");
+       debug(9, 1) ("--> releasing '%s'\n", ftpState->entry->url);
        storeReleaseRequest(ftpState->entry);
     }
     ftpDataTransferDone(ftpState);
index e130d3aea1bd5aa171fe3cb1474c19c8c9a6d554..9c5ebf52d2ea82f9b4f804acc60fd502181bd597 100644 (file)
@@ -73,6 +73,7 @@ extern void icpProcessExpired _PARAMS((int fd, void *));
 extern int modifiedSince _PARAMS((StoreEntry *, request_t *));
 extern char *clientConstructTraceEcho _PARAMS((clientHttpRequest *));
 extern void clientPurgeRequest _PARAMS((clientHttpRequest *));
+extern int checkNegativeHit(StoreEntry *);
 
 #if USE_PROXY_AUTH
 extern const char *proxyAuthenticate(const char *headers);