From: wessels <> Date: Fri, 19 Jul 1996 23:38:36 +0000 (+0000) Subject: Changed ttlSet to NOT return the ttl, instead set entry->expires and X-Git-Tag: SQUID_3_0_PRE1~6023 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd44ede35bb4e7305f570f0eb60bd9e1d8e8dbdc;p=thirdparty%2Fsquid.git Changed ttlSet to NOT return the ttl, instead set entry->expires and entry->lastmod directly. --- diff --git a/src/ftp.cc b/src/ftp.cc index a33390fd25..890e00b77e 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1,6 +1,6 @@ /* - * $Id: ftp.cc,v 1.44 1996/07/19 02:42:21 wessels Exp $ + * $Id: ftp.cc,v 1.45 1996/07/19 17:38:36 wessels Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -274,7 +274,7 @@ static void ftpProcessReplyHeader(data, buf, size) case 301: /* Moved Permanently */ case 410: /* Gone */ /* These can be cached for a long time, make the key public */ - entry->expires = squid_curtime + ttlSet(entry); + ttlSet(entry); if (BIT_TEST(entry->flag, CACHABLE)) storeSetPublicKey(entry); break; @@ -382,7 +382,7 @@ int ftpReadReply(fd, data) BIT_RESET(entry->flag, CACHABLE); storeReleaseRequest(entry); } else if (!(entry->flag & DELETE_BEHIND)) { - entry->expires = squid_curtime + ttlSet(entry); + ttlSet(entry); } /* update fdstat and fdtable */ storeComplete(entry); diff --git a/src/gopher.cc b/src/gopher.cc index 44ebf033fe..e8308f8fdb 100644 --- a/src/gopher.cc +++ b/src/gopher.cc @@ -1,5 +1,5 @@ /* - * $Id: gopher.cc,v 1.33 1996/07/18 20:27:01 wessels Exp $ + * $Id: gopher.cc,v 1.34 1996/07/19 17:38:37 wessels Exp $ * * DEBUG: section 10 Gopher * AUTHOR: Harvest Derived @@ -772,7 +772,7 @@ int gopherReadReply(fd, data) if (data->conversion != NORMAL) gopherEndHTML(data); if (!(entry->flag & DELETE_BEHIND)) - entry->expires = squid_curtime + ttlSet(entry); + ttlSet(entry); BIT_RESET(entry->flag, DELAY_SENDING); storeComplete(entry); comm_close(fd); diff --git a/src/http.cc b/src/http.cc index 0f416b1217..da70118f63 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,5 +1,5 @@ /* - * $Id: http.cc,v 1.62 1996/07/18 20:27:02 wessels Exp $ + * $Id: http.cc,v 1.63 1996/07/19 17:38:38 wessels Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -203,7 +203,7 @@ static void httpLifetimeExpire(fd, httpState) static void httpMakePublic(entry) StoreEntry *entry; { - entry->expires = squid_curtime + ttlSet(entry); + ttlSet(entry); if (BIT_TEST(entry->flag, CACHABLE)) storeSetPublicKey(entry); } diff --git a/src/squid.h b/src/squid.h index d9e16d6a24..5c2d367f54 100644 --- a/src/squid.h +++ b/src/squid.h @@ -1,6 +1,6 @@ /* - * $Id: squid.h,v 1.28 1996/07/18 20:27:08 wessels Exp $ + * $Id: squid.h,v 1.29 1996/07/19 17:38:38 wessels Exp $ * * AUTHOR: Duane Wessels * @@ -281,6 +281,6 @@ extern int objcacheStart _PARAMS((int, char *, StoreEntry *)); extern void send_announce _PARAMS((void)); extern int sslStart _PARAMS((int fd, char *, request_t *, char *, int *sz)); extern char *storeToString _PARAMS((StoreEntry *)); -extern time_t ttlSet _PARAMS((StoreEntry *)); +extern void ttlSet _PARAMS((StoreEntry *)); extern void ttlAddToList _PARAMS((char *, time_t, int, time_t)); extern int waisStart _PARAMS((int, char *, method_t, char *, StoreEntry *));