From: wessels <> Date: Fri, 24 Oct 1997 09:14:35 +0000 (+0000) Subject: Finish LOG_TCP_NEGATIVE_HIT X-Git-Tag: SQUID_3_0_PRE1~4709 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e33ba616256c9867b966bc8b4222821b91b18d1f;p=thirdparty%2Fsquid.git Finish LOG_TCP_NEGATIVE_HIT --- diff --git a/src/client_side.cc b/src/client_side.cc index 501bfb18ef..109ced4d8c 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -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; +} diff --git a/src/ftp.cc b/src/ftp.cc index 634c594274..9de60d67ed 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -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); diff --git a/src/protos.h b/src/protos.h index e130d3aea1..9c5ebf52d2 100644 --- a/src/protos.h +++ b/src/protos.h @@ -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);