From: wessels <> Date: Tue, 15 Sep 1998 03:28:00 +0000 (+0000) Subject: removed EBIT macros for StoreEntry->flag X-Git-Tag: SQUID_3_0_PRE1~2735 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=415e0dd2308ae7b77de2831dd69efe8868c96c6d;p=thirdparty%2Fsquid.git removed EBIT macros for StoreEntry->flag --- diff --git a/src/client_side.cc b/src/client_side.cc index 6755bdf402..b169ffc9ca 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.393 1998/09/14 02:33:01 wessels Exp $ + * $Id: client_side.cc,v 1.394 1998/09/14 21:28:00 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -485,7 +485,7 @@ clientPurgeRequest(clientHttpRequest * http) int checkNegativeHit(StoreEntry * e) { - if (!EBIT_TEST(e->flag, ENTRY_NEGCACHED)) + if (!e->flags.entry_negcached) return 0; if (e->expires <= squid_curtime) return 0; @@ -1524,7 +1524,7 @@ clientWriteComplete(int fd, char *bufnotused, size_t size, int errflag, void *da } else if (!done) { debug(33, 5) ("clientWriteComplete: closing, !done\n"); comm_close(fd); - } else if (EBIT_TEST(entry->flag, ENTRY_BAD_LENGTH)) { + } else if (entry->flags.entry_bad_length) { debug(33, 5) ("clientWriteComplete: closing, ENTRY_BAD_LENGTH\n"); comm_close(fd); } else if (http->request->flags.proxy_keepalive) { @@ -1590,7 +1590,7 @@ clientProcessRequest2(clientHttpRequest * http) } else if (!storeEntryValidToSend(e)) { http->entry = NULL; return LOG_TCP_MISS; - } else if (EBIT_TEST(e->flag, ENTRY_SPECIAL)) { + } else if (e->flags.entry_special) { /* Special entries are always hits, no matter what the client says */ http->entry = e; return LOG_TCP_HIT; @@ -1692,7 +1692,7 @@ clientProcessMiss(clientHttpRequest * http) * or IMS request. */ if (http->entry) { - if (EBIT_TEST(http->entry->flag, ENTRY_SPECIAL)) + if (http->entry->flags.entry_special) debug(33, 0) ("clientProcessMiss: miss on a special object (%s).\n", url); storeUnregister(http->entry, http); storeUnlockObject(http->entry); @@ -2256,7 +2256,7 @@ CheckQuickAbort2(const clientHttpRequest * http) if (!http->request->flags.cachable) return 1; - if (EBIT_TEST(http->entry->flag, KEY_PRIVATE)) + if (http->entry->flags.key_private) return 1; if (http->entry->mem_obj == NULL) return 1; diff --git a/src/enums.h b/src/enums.h index 075a62caf6..15676fb02e 100644 --- a/src/enums.h +++ b/src/enums.h @@ -1,6 +1,6 @@ /* - * $Id: enums.h,v 1.126 1998/08/30 05:21:40 wessels Exp $ + * $Id: enums.h,v 1.127 1998/09/14 21:28:01 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -436,31 +436,6 @@ typedef enum { PD_INIT_PENDING } peer_cd_t; -/* - * These are for StoreEntry->flag, which is defined as a SHORT - * - * NOTE: These flags are written to swap.state, so think very carefully - * about deleting or re-assigning! - */ -enum { - ENTRY_SPECIAL, - ENTRY_REVALIDATE, - DELAY_SENDING, - RELEASE_REQUEST, - REFRESH_REQUEST, - ENTRY_CACHABLE, - ENTRY_DISPATCHED, - KEY_PRIVATE, -#ifndef PPNR_WIP - ENTRY_UNUSED_08, -#else - ENTRY_FWD_HDR_WAIT, -#endif /* PPNR_WIP */ - ENTRY_NEGCACHED, - ENTRY_VALIDATED, - ENTRY_BAD_LENGTH -}; - enum { HTTP_PROXYING, HTTP_KEEPALIVE diff --git a/src/forward.cc b/src/forward.cc index 6d4f74399e..3eecdc53ca 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -1,6 +1,6 @@ /* - * $Id: forward.cc,v 1.26 1998/09/01 23:31:23 wessels Exp $ + * $Id: forward.cc,v 1.27 1998/09/14 21:28:02 wessels Exp $ * * DEBUG: section 17 Request Forwarding * AUTHOR: Duane Wessels @@ -260,10 +260,10 @@ fwdDispatch(FwdState * fwdState) fwdState->client_fd, RequestMethodStr[request->method], storeUrl(entry)); - /*assert(!EBIT_TEST(entry->flag, ENTRY_DISPATCHED)); */ + /*assert(!entry->flags.entry_dispatched); */ assert(entry->ping_status != PING_WAITING); assert(entry->lock_count); - EBIT_SET(entry->flag, ENTRY_DISPATCHED); + entry->flags.entry_dispatched = 1; netdbPingSite(request->host); /* * Assert that server_fd is set. This is to guarantee that fwdState @@ -412,7 +412,7 @@ void fwdFail(FwdState * fwdState, int err_code, http_status http_code, int xerrno) { #ifdef PPNR_WIP - assert(EBIT_TEST(fwdState->entry->flag, ENTRY_FWD_HDR_WAIT)); + assert(fwdState->entry->flags.entry_fwd_hdr_wait); #endif /* PPNR_WIP */ debug(17, 3) ("fwdFail: %s \"%s\"\n\t%s\n", err_type_str[err_code], diff --git a/src/ftp.cc b/src/ftp.cc index 752fb91758..3a34d57217 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1,6 +1,6 @@ /* - * $Id: ftp.cc,v 1.250 1998/09/04 23:04:46 wessels Exp $ + * $Id: ftp.cc,v 1.251 1998/09/14 21:28:03 wessels Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -2235,7 +2235,7 @@ ftpAppendSuccessHeader(FtpStateData * ftpState) storeBufferFlush(e); reply->hdr_sz = e->mem_obj->inmem_hi; storeTimestampsSet(e); - if (EBIT_TEST(e->flag, ENTRY_CACHABLE)) + if (e->flags.entry_cachable) storeSetPublicKey(e); } diff --git a/src/gopher.cc b/src/gopher.cc index 632b029278..81caaf10fa 100644 --- a/src/gopher.cc +++ b/src/gopher.cc @@ -1,7 +1,7 @@ /* - * $Id: gopher.cc,v 1.137 1998/09/04 23:04:47 wessels Exp $ + * $Id: gopher.cc,v 1.138 1998/09/14 21:28:04 wessels Exp $ * * DEBUG: section 10 Gopher * AUTHOR: Harvest Derived @@ -763,7 +763,7 @@ gopherSendRequest(int fd, void *data) gopherSendComplete, data, memFree4K); - if (EBIT_TEST(gopherState->entry->flag, ENTRY_CACHABLE)) + if (gopherState->entry->flags.entry_cachable) storeSetPublicKey(gopherState->entry); /* Make it public */ } diff --git a/src/http.cc b/src/http.cc index 73b0bfd7e5..d6ef68c5ab 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.316 1998/09/10 19:48:55 wessels Exp $ + * $Id: http.cc,v 1.317 1998/09/14 21:28:05 wessels Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -106,7 +106,7 @@ httpTimeout(int fd, void *data) static void httpMakePublic(StoreEntry * entry) { - if (EBIT_TEST(entry->flag, ENTRY_CACHABLE)) + if (entry->flags.entry_cachable) storeSetPublicKey(entry); } @@ -124,7 +124,7 @@ static void httpCacheNegatively(StoreEntry * entry) { storeNegativeCache(entry); - if (EBIT_TEST(entry->flag, ENTRY_CACHABLE)) + if (entry->flags.entry_cachable) storeSetPublicKey(entry); } @@ -134,7 +134,7 @@ httpMaybeRemovePublic(StoreEntry * e, http_status status) int remove = 0; const cache_key *key; StoreEntry *pe; - if (!EBIT_TEST(e->flag, KEY_PRIVATE)) + if (!e->flags.key_private) return; switch (status) { case HTTP_OK: @@ -319,9 +319,9 @@ httpProcessReplyHeader(HttpStateData * httpState, const char *buf, int size) } if (reply->cache_control) { if (EBIT_TEST(reply->cache_control->mask, CC_PROXY_REVALIDATE)) - EBIT_SET(entry->flag, ENTRY_REVALIDATE); + entry->flags.entry_revalidate = 1; else if (EBIT_TEST(reply->cache_control->mask, CC_MUST_REVALIDATE)) - EBIT_SET(entry->flag, ENTRY_REVALIDATE); + entry->flags.entry_revalidate = 1; } if (EBIT_TEST(httpState->flags, HTTP_KEEPALIVE)) if (httpState->peer) diff --git a/src/mime.cc b/src/mime.cc index 29935fe258..ba174fc27a 100644 --- a/src/mime.cc +++ b/src/mime.cc @@ -1,6 +1,6 @@ /* - * $Id: mime.cc,v 1.78 1998/08/21 03:15:18 wessels Exp $ + * $Id: mime.cc,v 1.79 1998/09/14 21:28:05 wessels Exp $ * * DEBUG: section 25 MIME Parsing * AUTHOR: Harvest Derived @@ -415,7 +415,7 @@ mimeLoadIconFile(const char *icon) storeSetPublicKey(e); storeComplete(e); storeTimestampsSet(e); - EBIT_SET(e->flag, ENTRY_SPECIAL); + e->flags.entry_special = 1; debug(25, 3) ("Loaded icon %s\n", url); storeUnlockObject(e); memFree(MEM_4K_BUF, buf); diff --git a/src/neighbors.cc b/src/neighbors.cc index bf5f70da3f..701a386c8b 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -1,6 +1,6 @@ /* - * $Id: neighbors.cc,v 1.245 1998/09/14 20:29:30 wessels Exp $ + * $Id: neighbors.cc,v 1.246 1998/09/14 21:28:06 wessels Exp $ * * DEBUG: section 15 Neighbor Routines * AUTHOR: Harvest Derived @@ -724,7 +724,7 @@ neighborsUdpAck(const cache_key * key, icp_common_t * header, const struct socka return; } /* check if someone is already fetching it */ - if (EBIT_TEST(entry->flag, ENTRY_DISPATCHED)) { + if (entry->flags.entry_dispatched) { debug(15, 3) ("neighborsUdpAck: '%s' already being fetched.\n", storeKeyText(key)); neighborCountIgnored(p); @@ -1197,7 +1197,7 @@ neighborsHtcpReply(const cache_key * key, htcpReplyData * htcp, const struct soc return; } /* check if someone is already fetching it */ - if (EBIT_TEST(e->flag, ENTRY_DISPATCHED)) { + if (e->flags.entry_dispatched) { debug(15, 3) ("neighborsUdpAck: '%s' already being fetched.\n", storeKeyText(key)); neighborCountIgnored(p); diff --git a/src/peer_digest.cc b/src/peer_digest.cc index 161f5d9593..aee9fbfa75 100644 --- a/src/peer_digest.cc +++ b/src/peer_digest.cc @@ -1,6 +1,6 @@ /* - * $Id: peer_digest.cc,v 1.47 1998/09/14 15:46:48 wessels Exp $ + * $Id: peer_digest.cc,v 1.48 1998/09/14 21:28:07 wessels Exp $ * * DEBUG: section 72 Peer Digest Routines * AUTHOR: Alex Rousskov @@ -274,7 +274,7 @@ peerDigestRequest(peer * p) } e = fetch->entry = storeCreateEntry(url, url, req->flags, req->method); debug(72, 5) ("peerDigestRequest: new entry is private: %d\n", - (int) EBIT_TEST(e->flag, KEY_PRIVATE)); + (int) e->flags.key_private); storeClientListAdd(e, fetch); /* set lastmod to trigger IMS request if possible */ if (old_e) diff --git a/src/peer_select.cc b/src/peer_select.cc index 169b7dddb8..3af49ea12b 100644 --- a/src/peer_select.cc +++ b/src/peer_select.cc @@ -1,6 +1,6 @@ /* - * $Id: peer_select.cc,v 1.79 1998/08/27 06:28:28 wessels Exp $ + * $Id: peer_select.cc,v 1.80 1998/09/14 21:28:08 wessels Exp $ * * DEBUG: section 44 Peer Selection Algorithm * AUTHOR: Duane Wessels @@ -113,7 +113,7 @@ peerSelectIcpPing(request_t * request, int direct, StoreEntry * entry) assert(direct != DIRECT_YES); if (!request->flags.hierarchical && direct != DIRECT_NO) return 0; - if (EBIT_TEST(entry->flag, KEY_PRIVATE) && !neighbors_do_private_keys) + if (entry->flags.key_private && !neighbors_do_private_keys) if (direct != DIRECT_NO) return 0; n = neighborsCount(request); diff --git a/src/protos.h b/src/protos.h index 0b8647f5a0..f2032d3185 100644 --- a/src/protos.h +++ b/src/protos.h @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.262 1998/09/11 17:07:46 wessels Exp $ + * $Id: protos.h,v 1.263 1998/09/14 21:28:09 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -668,6 +668,7 @@ extern void pconnHistCount(int, int); extern int stat5minClientRequests(void); extern double stat5minCPUUsage(void); extern double statMedianSvc(int, int); +extern const char *storeEntryFlags(const StoreEntry *); /* StatHist */ diff --git a/src/refresh.cc b/src/refresh.cc index 92e7625705..615ca0669e 100644 --- a/src/refresh.cc +++ b/src/refresh.cc @@ -1,7 +1,7 @@ /* - * $Id: refresh.cc,v 1.34 1998/08/21 04:03:48 wessels Exp $ + * $Id: refresh.cc,v 1.35 1998/09/14 21:28:10 wessels Exp $ * * DEBUG: section 22 Refresh Calculation * AUTHOR: Harvest Derived @@ -117,7 +117,7 @@ refreshCheck(const StoreEntry * entry, request_t * request, time_t delta) uri = urlCanonical(request); debug(22, 3) ("refreshCheck: '%s'\n", uri); refreshCounts.total++; - if (EBIT_TEST(entry->flag, ENTRY_REVALIDATE)) { + if (entry->flags.entry_revalidate) { debug(22, 3) ("refreshCheck: YES: Required Authorization\n"); refreshCounts.revalidate_stale++; return 1; @@ -233,7 +233,7 @@ refreshWhen(const StoreEntry * entry) assert(entry->mem_obj->url); debug(22, 3) ("refreshWhen: key '%s'\n", storeKeyText(entry->key)); debug(22, 3) ("refreshWhen: url '%s'\n", entry->mem_obj->url); - if (EBIT_TEST(entry->flag, ENTRY_REVALIDATE)) { + if (entry->flags.entry_revalidate) { debug(22, 3) ("refreshWhen: NOW: Required Authorization\n"); return refresh_time; } diff --git a/src/stat.cc b/src/stat.cc index 795b3399e7..45c435574c 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -1,6 +1,6 @@ /* - * $Id: stat.cc,v 1.286 1998/09/10 16:03:25 wessels Exp $ + * $Id: stat.cc,v 1.287 1998/09/14 21:28:10 wessels Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived @@ -47,7 +47,6 @@ typedef struct { /* LOCALS */ static const char *describeStatuses(const StoreEntry *); -static const char *describeFlags(const StoreEntry *); static const char *describeTimestamps(const StoreEntry *); static void statAvgTick(void *notused); static void statAvgDump(StoreEntry *, int minutes, int hours); @@ -196,34 +195,33 @@ describeStatuses(const StoreEntry * entry) return buf; } -static const char * -describeFlags(const StoreEntry * entry) +const char * +storeEntryFlags(const StoreEntry * entry) { LOCAL_ARRAY(char, buf, 256); - int flags = (int) entry->flag; char *t; buf[0] = '\0'; - if (EBIT_TEST(flags, ENTRY_SPECIAL)) + if (entry->flags.entry_special) strcat(buf, "SPECIAL,"); - if (EBIT_TEST(flags, ENTRY_REVALIDATE)) + if (entry->flags.entry_revalidate) strcat(buf, "REVALIDATE,"); - if (EBIT_TEST(flags, DELAY_SENDING)) + if (entry->flags.delay_sending) strcat(buf, "DELAY_SENDING,"); - if (EBIT_TEST(flags, RELEASE_REQUEST)) + if (entry->flags.release_request) strcat(buf, "RELEASE_REQUEST,"); - if (EBIT_TEST(flags, REFRESH_REQUEST)) + if (entry->flags.refresh_request) strcat(buf, "REFRESH_REQUEST,"); - if (EBIT_TEST(flags, ENTRY_CACHABLE)) + if (entry->flags.entry_cachable) strcat(buf, "CACHABLE,"); - if (EBIT_TEST(flags, ENTRY_DISPATCHED)) + if (entry->flags.entry_dispatched) strcat(buf, "DISPATCHED,"); - if (EBIT_TEST(flags, KEY_PRIVATE)) + if (entry->flags.key_private) strcat(buf, "PRIVATE,"); - if (EBIT_TEST(flags, ENTRY_NEGCACHED)) + if (entry->flags.entry_negcached) strcat(buf, "NEGCACHED,"); - if (EBIT_TEST(flags, ENTRY_VALIDATED)) + if (entry->flags.entry_validated) strcat(buf, "VALIDATED,"); - if (EBIT_TEST(flags, ENTRY_BAD_LENGTH)) + if (entry->flags.entry_bad_length) strcat(buf, "BAD_LENGTH,"); if ((t = strrchr(buf, ','))) *t = '\0'; @@ -253,7 +251,7 @@ statStoreEntry(StoreEntry * s, StoreEntry * e) storeAppendPrintf(s, "\t%s %s\n", RequestMethodStr[mem->method], mem->log_url); storeAppendPrintf(s, "\t%s\n", describeStatuses(e)); - storeAppendPrintf(s, "\t%s\n", describeFlags(e)); + storeAppendPrintf(s, "\t%s\n", storeEntryFlags(e)); storeAppendPrintf(s, "\t%s\n", describeTimestamps(e)); storeAppendPrintf(s, "\t%d locks, %d clients, %d refs\n", (int) e->lock_count, diff --git a/src/store.cc b/src/store.cc index 26a010587b..a14b1fe723 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.457 1998/09/11 17:07:48 wessels Exp $ + * $Id: store.cc,v 1.458 1998/09/14 21:28:12 wessels Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -225,17 +225,17 @@ storeLockObject(StoreEntry * e) void storeReleaseRequest(StoreEntry * e) { - if (EBIT_TEST(e->flag, RELEASE_REQUEST)) + if (e->flags.release_request) return; assert(storeEntryLocked(e)); debug(20, 3) ("storeReleaseRequest: '%s'\n", storeKeyText(e->key)); - EBIT_SET(e->flag, RELEASE_REQUEST); + e->flags.release_request = 1; /* * Clear cachable flag here because we might get called before * anyone else even looks at the cachability flag. Also, this * prevents httpMakePublic from really setting a public key. */ - EBIT_CLR(e->flag, ENTRY_CACHABLE); + e->flags.entry_cachable = 0; storeSetPrivateKey(e); } @@ -250,11 +250,11 @@ storeUnlockObject(StoreEntry * e) if (e->lock_count) return (int) e->lock_count; if (e->store_status == STORE_PENDING) { - assert(!EBIT_TEST(e->flag, ENTRY_DISPATCHED)); - EBIT_SET(e->flag, RELEASE_REQUEST); + assert(!e->flags.entry_dispatched); + e->flags.release_request = 1; } assert(storePendingNClients(e) == 0); - if (EBIT_TEST(e->flag, RELEASE_REQUEST)) + if (e->flags.release_request) storeRelease(e); else if (storeKeepInMemory(e)) { storeSetMemStatus(e, IN_MEMORY); @@ -262,7 +262,7 @@ storeUnlockObject(StoreEntry * e) e->mem_obj->request = NULL; } else { storePurgeMem(e); - if (EBIT_TEST(e->flag, KEY_PRIVATE)) { + if (e->flags.key_private) { dlinkDelete(&e->lru, &store_list); dlinkAddTail(e, &e->lru, &store_list); } @@ -293,7 +293,7 @@ storeSetPrivateKey(StoreEntry * e) { const cache_key *newkey; MemObject *mem = e->mem_obj; - if (e->key && EBIT_TEST(e->flag, KEY_PRIVATE)) + if (e->key && e->flags.key_private) return; /* is already private */ if (e->key) { if (e->swap_file_number > -1) @@ -307,7 +307,7 @@ storeSetPrivateKey(StoreEntry * e) newkey = storeKeyPrivate("JUNK", METHOD_NONE, getKeyCounter()); } assert(hash_lookup(store_table, newkey) == NULL); - EBIT_SET(e->flag, KEY_PRIVATE); + e->flags.key_private = 1; storeHashInsert(e, newkey); } @@ -317,7 +317,7 @@ storeSetPublicKey(StoreEntry * e) StoreEntry *e2 = NULL; const cache_key *newkey; MemObject *mem = e->mem_obj; - if (e->key && !EBIT_TEST(e->flag, KEY_PRIVATE)) + if (e->key && !e->flags.key_private) return; /* is already public */ assert(mem); /* @@ -327,7 +327,7 @@ storeSetPublicKey(StoreEntry * e) * store clients won't be able to access object data which has * been freed from memory. */ - assert(!EBIT_TEST(e->flag, RELEASE_REQUEST)); + assert(!e->flags.release_request); newkey = storeKeyPublic(mem->url, mem->method); if ((e2 = (StoreEntry *) hash_lookup(store_table, newkey))) { debug(20, 3) ("storeSetPublicKey: Making old '%s' private.\n", mem->url); @@ -337,7 +337,7 @@ storeSetPublicKey(StoreEntry * e) } if (e->key) storeHashDelete(e); - EBIT_CLR(e->flag, KEY_PRIVATE); + e->flags.key_private = 0; storeHashInsert(e, newkey); if (e->swap_file_number > -1) storeDirSwapLog(e, SWAP_LOG_ADD); @@ -359,10 +359,10 @@ storeCreateEntry(const char *url, const char *log_url, request_flags flags, meth else storeSetPublicKey(e); if (flags.cachable) { - EBIT_SET(e->flag, ENTRY_CACHABLE); - EBIT_CLR(e->flag, RELEASE_REQUEST); + e->flags.entry_cachable = 1; + e->flags.release_request = 0; } else { - EBIT_CLR(e->flag, ENTRY_CACHABLE); + e->flags.entry_cachable = 0; storeReleaseRequest(e); } e->store_status = STORE_PENDING; @@ -373,9 +373,9 @@ storeCreateEntry(const char *url, const char *log_url, request_flags flags, meth e->lastref = squid_curtime; e->timestamp = 0; /* set in storeTimestampsSet() */ e->ping_status = PING_NONE; - EBIT_SET(e->flag, ENTRY_VALIDATED); + e->flags.entry_validated = 1; #ifdef PPNR_WIP - EBIT_SET(e->flag, ENTRY_FWD_HDR_WAIT); + e->flags.entry_fwd_hdr_wait = 1; #endif /* PPNR_WIP */ return e; } @@ -403,7 +403,7 @@ storeAppend(StoreEntry * e, const char *buf, int len) stmemAppend(&mem->data_hdr, buf, len); mem->inmem_hi += len; } - if (EBIT_TEST(e->flag, DELAY_SENDING)) + if (e->flags.delay_sending) return; #ifdef OPTIMISTIC_IO storeLockObject(e); @@ -483,23 +483,23 @@ storeCheckCachable(StoreEntry * e) store_check_cachable_hist.no.non_get++; } else #endif - if (!EBIT_TEST(e->flag, ENTRY_CACHABLE)) { + if (!e->flags.entry_cachable) { debug(20, 2) ("storeCheckCachable: NO: not cachable\n"); store_check_cachable_hist.no.not_entry_cachable++; - } else if (EBIT_TEST(e->flag, RELEASE_REQUEST)) { + } else if (e->flags.release_request) { debug(20, 2) ("storeCheckCachable: NO: release requested\n"); store_check_cachable_hist.no.release_request++; - } else if (e->store_status == STORE_OK && EBIT_TEST(e->flag, ENTRY_BAD_LENGTH)) { + } else if (e->store_status == STORE_OK && e->flags.entry_bad_length) { debug(20, 2) ("storeCheckCachable: NO: wrong content-length\n"); store_check_cachable_hist.no.wrong_content_length++; - } else if (EBIT_TEST(e->flag, ENTRY_NEGCACHED)) { + } else if (e->flags.entry_negcached) { debug(20, 3) ("storeCheckCachable: NO: negative cached\n"); store_check_cachable_hist.no.negative_cached++; return 0; /* avoid release call below */ } else if (e->mem_obj->inmem_hi > Config.Store.maxObjectSize) { debug(20, 2) ("storeCheckCachable: NO: too big\n"); store_check_cachable_hist.no.too_big++; - } else if (EBIT_TEST(e->flag, KEY_PRIVATE)) { + } else if (e->flags.key_private) { debug(20, 3) ("storeCheckCachable: NO: private key\n"); store_check_cachable_hist.no.private_key++; } else if (storeTooManyDiskFilesOpen()) { @@ -514,7 +514,7 @@ storeCheckCachable(StoreEntry * e) return 1; } storeReleaseRequest(e); - EBIT_CLR(e->flag, ENTRY_CACHABLE); + e->flags.entry_cachable = 0; return 0; } @@ -553,7 +553,7 @@ storeComplete(StoreEntry * e) e->store_status = STORE_OK; assert(e->mem_status == NOT_IN_MEMORY); if (!storeEntryValidLength(e)) - EBIT_SET(e->flag, ENTRY_BAD_LENGTH); + e->flags.entry_bad_length = 1; #if USE_CACHE_DIGESTS if (e->mem_obj->request) e->mem_obj->request->hier.store_complete_stop = current_time; @@ -566,8 +566,8 @@ storeComplete(StoreEntry * e) void storePPNR(StoreEntry * e) { - assert(EBIT_TEST(e->flag, ENTRY_FWD_HDR_WAIT)); - EBIT_CLR(e->flag, ENTRY_FWD_HDR_WAIT); + assert(e->flags.entry_fwd_hdr_wait); + e->flags.entry_fwd_hdr_wait = 0; } #endif /* PPNR_WIP */ @@ -774,7 +774,7 @@ storeRelease(StoreEntry * e) storeUrl(e)); storeExpireNow(e); storeSetPrivateKey(e); - EBIT_SET(e->flag, RELEASE_REQUEST); + e->flags.release_request = 1; return; } #endif @@ -783,9 +783,9 @@ storeRelease(StoreEntry * e) storeUnlinkFileno(e->swap_file_number); storeDirMapBitReset(e->swap_file_number); if (e->swap_status == SWAPOUT_DONE) - if (EBIT_TEST(e->flag, ENTRY_VALIDATED)) + if (e->flags.entry_validated) storeDirUpdateSwapSize(e->swap_file_number, e->swap_file_sz, -1); - if (!EBIT_TEST(e->flag, KEY_PRIVATE)) + if (!e->flags.key_private) storeDirSwapLog(e, SWAP_LOG_DEL); } storeSetMemStatus(e, NOT_IN_MEMORY); @@ -804,7 +804,7 @@ storeEntryLocked(const StoreEntry * e) return 1; if (e->store_status == STORE_PENDING) return 1; - if (EBIT_TEST(e->flag, ENTRY_SPECIAL)) + if (e->flags.entry_special) return 1; return 0; } @@ -940,9 +940,9 @@ storeCheckExpired(const StoreEntry * e) { if (storeEntryLocked(e)) return 0; - if (EBIT_TEST(e->flag, RELEASE_REQUEST)) + if (e->flags.release_request) return 1; - if (EBIT_TEST(e->flag, ENTRY_NEGCACHED) && squid_curtime >= e->expires) + if (e->flags.entry_negcached && squid_curtime >= e->expires) return 1; if (squid_curtime - e->lastref > storeExpiredReferenceAge()) return 1; @@ -981,7 +981,7 @@ void storeNegativeCache(StoreEntry * e) { e->expires = squid_curtime + Config.negativeTtl; - EBIT_SET(e->flag, ENTRY_NEGCACHED); + e->flags.entry_negcached = 1; } void @@ -1006,9 +1006,9 @@ expiresMoreThan(time_t expires, time_t when) int storeEntryValidToSend(StoreEntry * e) { - if (EBIT_TEST(e->flag, RELEASE_REQUEST)) + if (e->flags.release_request) return 0; - if (EBIT_TEST(e->flag, ENTRY_NEGCACHED)) + if (e->flags.entry_negcached) if (e->expires <= squid_curtime) return 0; if (e->store_status == STORE_ABORTED) @@ -1090,7 +1090,7 @@ storeEntryDump(StoreEntry * e, int l) debug(20, l) ("StoreEntry->lastmod: %d\n", (int) e->lastmod); debug(20, l) ("StoreEntry->swap_file_sz: %d\n", (int) e->swap_file_sz); debug(20, l) ("StoreEntry->refcount: %d\n", e->refcount); - debug(20, l) ("StoreEntry->flag: %X\n", e->flag); + debug(20, l) ("StoreEntry->flags: %s\n", storeEntryFlags(e)); debug(20, l) ("StoreEntry->swap_file_number: %d\n", (int) e->swap_file_number); debug(20, l) ("StoreEntry->lock_count: %d\n", (int) e->lock_count); debug(20, l) ("StoreEntry->mem_status: %d\n", (int) e->mem_status); @@ -1141,14 +1141,14 @@ storeCreateMemObject(StoreEntry * e, const char *url, const char *log_url) void storeBuffer(StoreEntry * e) { - EBIT_SET(e->flag, DELAY_SENDING); + e->flags.delay_sending = 1; } /* this just clears DELAY_SENDING and Invokes the handlers */ void storeBufferFlush(StoreEntry * e) { - EBIT_CLR(e->flag, DELAY_SENDING); + e->flags.delay_sending = 0; InvokeHandlers(e); storeCheckSwapOut(e); } diff --git a/src/store_client.cc b/src/store_client.cc index c724a5bbea..f361d26b6d 100644 --- a/src/store_client.cc +++ b/src/store_client.cc @@ -1,6 +1,6 @@ /* - * $Id: store_client.cc,v 1.40 1998/08/24 21:07:51 wessels Exp $ + * $Id: store_client.cc,v 1.41 1998/09/14 21:28:13 wessels Exp $ * * DEBUG: section 20 Storage Manager Client-Side Interface * AUTHOR: Duane Wessels @@ -173,7 +173,7 @@ storeClientCopy2(StoreEntry * e, store_client * sc) if (sc->flags.copy_event_pending) return; #ifdef PPNR_WIP - if (EBIT_TEST(e->flag, ENTRY_FWD_HDR_WAIT)) + if (e->flags.entry_fwd_hdr_wait) return; #endif /* PPNR_WIP */ if (sc->flags.store_copying) { diff --git a/src/store_digest.cc b/src/store_digest.cc index 864f6fbfc4..31d8800c5d 100644 --- a/src/store_digest.cc +++ b/src/store_digest.cc @@ -1,5 +1,5 @@ /* - * $Id: store_digest.cc,v 1.26 1998/08/21 03:15:25 wessels Exp $ + * $Id: store_digest.cc,v 1.27 1998/09/14 21:28:13 wessels Exp $ * * DEBUG: section 71 Store Digest Manager * AUTHOR: Alex Rousskov @@ -139,7 +139,7 @@ storeDigestDel(const StoreEntry * entry) assert(entry && store_digest); debug(71, 6) ("storeDigestDel: checking entry, key: %s\n", storeKeyText(entry->key)); - if (!EBIT_TEST(entry->flag, KEY_PRIVATE)) { + if (!entry->flags.key_private) { if (!cacheDigestTest(store_digest, entry->key)) { sd_stats.del_lost_count++; debug(71, 6) ("storeDigestDel: lost entry, key: %s url: %s\n", @@ -188,7 +188,7 @@ storeDigestAdd(const StoreEntry * entry) debug(71, 6) ("storeDigestAdd: checking entry, key: %s\n", storeKeyText(entry->key)); /* only public entries are digested */ - if (!EBIT_TEST(entry->flag, KEY_PRIVATE)) { + if (!entry->flags.key_private) { const time_t refresh = refreshWhen(entry); debug(71, 6) ("storeDigestAdd: entry expires in %d secs\n", (int) (refresh - squid_curtime)); @@ -326,7 +326,7 @@ storeDigestRewriteResume(void) assert(sd_state.rewrite_lock); assert(!sd_state.rebuild_lock); sd_state.rewrite_offset = 0; - EBIT_SET(e->flag, ENTRY_SPECIAL); + e->flags.entry_special = 1; /* setting public key will purge old digest entry if any */ storeSetPublicKey(e); /* fake reply */ diff --git a/src/store_dir.cc b/src/store_dir.cc index 8babbbe8ec..c499c41454 100644 --- a/src/store_dir.cc +++ b/src/store_dir.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir.cc,v 1.75 1998/08/20 02:49:12 wessels Exp $ + * $Id: store_dir.cc,v 1.76 1998/09/14 21:28:14 wessels Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -392,12 +392,12 @@ storeDirSwapLog(const StoreEntry * e, int op) int dirn; dirn = e->swap_file_number >> SWAP_DIR_SHIFT; assert(dirn < Config.cacheSwap.n_configured); - assert(!EBIT_TEST(e->flag, KEY_PRIVATE)); + assert(!e->flags.key_private); assert(e->swap_file_number >= 0); /* * icons and such; don't write them to the swap log */ - if (EBIT_TEST(e->flag, ENTRY_SPECIAL)) + if (e->flags.entry_special) return; assert(op > SWAP_LOG_NOP && op < SWAP_LOG_MAX); debug(20, 3) ("storeDirSwapLog: %s %s %08X\n", @@ -413,7 +413,7 @@ storeDirSwapLog(const StoreEntry * e, int op) s->lastmod = e->lastmod; s->swap_file_sz = e->swap_file_sz; s->refcount = e->refcount; - s->flags = e->flag; + s->flags = e->flags; xmemcpy(s->key, e->key, MD5_DIGEST_CHARS); file_write(Config.cacheSwap.swapDirs[dirn].swaplog_fd, -1, @@ -676,11 +676,11 @@ storeDirWriteCleanLogs(int reopen) continue; if (e->swap_file_sz <= 0) continue; - if (EBIT_TEST(e->flag, RELEASE_REQUEST)) + if (e->flags.release_request) continue; - if (EBIT_TEST(e->flag, KEY_PRIVATE)) + if (e->flags.key_private) continue; - if (EBIT_TEST(e->flag, ENTRY_SPECIAL)) + if (e->flags.entry_special) continue; dirn = storeDirNumber(e->swap_file_number); assert(dirn < N); @@ -695,7 +695,7 @@ storeDirWriteCleanLogs(int reopen) s.lastmod = e->lastmod; s.swap_file_sz = e->swap_file_sz; s.refcount = e->refcount; - s.flags = e->flag; + s.flags = e->flags; xmemcpy(&s.key, e->key, MD5_DIGEST_CHARS); xmemcpy(outbuf[dirn] + outbufoffset[dirn], &s, ss); outbufoffset[dirn] += ss; diff --git a/src/store_rebuild.cc b/src/store_rebuild.cc index 44162db744..fe51943179 100644 --- a/src/store_rebuild.cc +++ b/src/store_rebuild.cc @@ -1,6 +1,6 @@ /* - * $Id: store_rebuild.cc,v 1.47 1998/09/04 23:05:03 wessels Exp $ + * $Id: store_rebuild.cc,v 1.48 1998/09/14 21:28:15 wessels Exp $ * * DEBUG: section 20 Store Rebuild Routines * AUTHOR: Duane Wessels @@ -99,7 +99,7 @@ static StoreEntry *storeAddDiskRestore(const cache_key * key, time_t lastref, time_t lastmod, u_num32 refcount, - u_num32 flags, + store_flags flags, int clean); static AIOCB storeValidateComplete; @@ -197,7 +197,7 @@ storeRebuildFromDirectory(rebuild_dir * d) storeUnlinkFileno(sfileno); continue; } - if (EBIT_TEST(tmpe.flag, KEY_PRIVATE)) { + if (tmpe.flags.key_private) { storeUnlinkFileno(sfileno); RebuildState.badflags++; continue; @@ -224,7 +224,7 @@ storeRebuildFromDirectory(rebuild_dir * d) tmpe.lastref, tmpe.lastmod, tmpe.refcount, /* refcount */ - tmpe.flag, /* flags */ + tmpe.flags, /* flags */ d->clean); } return count; @@ -274,7 +274,7 @@ storeRebuildFromSwapLog(rebuild_dir * d) */ storeExpireNow(e); storeSetPrivateKey(e); - EBIT_SET(e->flag, RELEASE_REQUEST); + e->flags.release_request = 1; if (e->swap_file_number > -1) { storeDirMapBitReset(e->swap_file_number); e->swap_file_number = -1; @@ -298,7 +298,7 @@ storeRebuildFromSwapLog(rebuild_dir * d) RebuildState.invalid++; continue; } - if (EBIT_TEST(s.flags, KEY_PRIVATE)) { + if (s.flags.key_private) { RebuildState.badflags++; continue; } @@ -314,13 +314,17 @@ storeRebuildFromSwapLog(rebuild_dir * d) continue; } else if (used && e && e->swap_file_number == s.swap_file_number) { /* swapfile taken, same URL, newer, update meta */ - /* XXX what if e->store_status != STORE_OK? */ - e->lastref = s.timestamp; - e->timestamp = s.timestamp; - e->expires = s.expires; - e->lastmod = s.lastmod; - e->flag |= s.flags; - e->refcount += s.refcount; + if (e->store_status == STORE_OK) { + e->lastref = s.timestamp; + e->timestamp = s.timestamp; + e->expires = s.expires; + e->lastmod = s.lastmod; + e->flags = s.flags; + e->refcount += s.refcount; + } else { + debug_trap("storeRebuildFromSwapLog: bad condition"); + debug(20,1)("\tSee %s:%d\n", __FILE__, __LINE__); + } continue; } else if (used) { /* swapfile in use, not by this URL, log entry is newer */ @@ -352,7 +356,7 @@ storeRebuildFromSwapLog(rebuild_dir * d) /* junk old, load new */ storeExpireNow(e); storeSetPrivateKey(e); - EBIT_SET(e->flag, RELEASE_REQUEST); + e->flags.release_request = 1; if (e->swap_file_number > -1) { storeDirMapBitReset(e->swap_file_number); e->swap_file_number = -1; @@ -541,7 +545,7 @@ storeAddDiskRestore(const cache_key * key, time_t lastref, time_t lastmod, u_num32 refcount, - u_num32 flags, + store_flags flags, int clean) { StoreEntry *e = NULL; @@ -561,12 +565,12 @@ storeAddDiskRestore(const cache_key * key, e->expires = expires; e->lastmod = lastmod; e->refcount = refcount; - e->flag = flags; - EBIT_SET(e->flag, ENTRY_CACHABLE); - EBIT_CLR(e->flag, RELEASE_REQUEST); - EBIT_CLR(e->flag, KEY_PRIVATE); + e->flags = flags; + e->flags.entry_cachable = 1; + e->flags.release_request = 0; + e->flags.key_private = 0; e->ping_status = PING_NONE; - EBIT_CLR(e->flag, ENTRY_VALIDATED); + e->flags.entry_validated = 0; storeDirMapBitSet(e->swap_file_number); storeHashInsert(e, key); /* do it after we clear KEY_PRIVATE */ return e; @@ -596,7 +600,7 @@ storeCleanup(void *datanotused) while (NULL != (link_ptr = link_next)) { link_next = link_ptr->next; e = (StoreEntry *) link_ptr; - if (EBIT_TEST(e->flag, ENTRY_VALIDATED)) + if (e->flags.entry_validated) continue; /* * Calling storeRelease() has no effect because we're @@ -627,7 +631,7 @@ storeCleanup(void *datanotused) continue; } } - EBIT_SET(e->flag, ENTRY_VALIDATED); + e->flags.entry_validated = 1; /* Only set the file bit if we know its a valid entry */ /* otherwise, set it in the validation procedure */ storeDirUpdateSwapSize(e->swap_file_number, e->swap_file_sz, 1); @@ -646,9 +650,9 @@ storeValidate(StoreEntry * e, STVLDCB * callback, void *callback_data, void *tag #if !USE_ASYNC_IO int x; #endif - assert(!EBIT_TEST(e->flag, ENTRY_VALIDATED)); + assert(!e->flags.entry_validated); if (e->swap_file_number < 0) { - EBIT_CLR(e->flag, ENTRY_VALIDATED); + e->flags.entry_validated = 0; callback(callback_data, 0, 0); return; } @@ -692,9 +696,9 @@ storeValidateComplete(int fd, void *data, int retcode, int errcode) retcode = stat(path, sb); } if (retcode < 0 || sb->st_size == 0 || sb->st_size != e->swap_file_sz) { - EBIT_CLR(e->flag, ENTRY_VALIDATED); + e->flags.entry_validated = 0; } else { - EBIT_SET(e->flag, ENTRY_VALIDATED); + e->flags.entry_validated = 1; storeDirUpdateSwapSize(e->swap_file_number, e->swap_file_sz, 1); } errno = errcode; diff --git a/src/store_swapin.cc b/src/store_swapin.cc index cadfe677c6..d3748d1cde 100644 --- a/src/store_swapin.cc +++ b/src/store_swapin.cc @@ -1,6 +1,6 @@ /* - * $Id: store_swapin.cc,v 1.12 1998/08/10 19:37:50 wessels Exp $ + * $Id: store_swapin.cc,v 1.13 1998/09/14 21:28:16 wessels Exp $ * * DEBUG: section 20 Storage Manager Swapin Functions * AUTHOR: Duane Wessels @@ -50,7 +50,7 @@ storeSwapInStart(StoreEntry * e, SIH * callback, void *callback_data) { swapin_ctrl_t *ctrlp; assert(e->mem_status == NOT_IN_MEMORY); - if (!EBIT_TEST(e->flag, ENTRY_VALIDATED)) { + if (!e->flags.entry_validated) { /* We're still reloading and haven't validated this entry yet */ callback(-1, callback_data); return; @@ -64,7 +64,7 @@ storeSwapInStart(StoreEntry * e, SIH * callback, void *callback_data) ctrlp->e = e; ctrlp->callback = callback; ctrlp->callback_data = callback_data; - if (EBIT_TEST(e->flag, ENTRY_VALIDATED)) + if (e->flags.entry_validated) storeSwapInValidateComplete(ctrlp, 0, 0); else storeValidate(e, storeSwapInValidateComplete, ctrlp, callback_data); @@ -81,7 +81,7 @@ storeSwapInValidateComplete(void *data, int retcode, int errcode) } e = ctrlp->e; assert(e->mem_status == NOT_IN_MEMORY); - if (!EBIT_TEST(e->flag, ENTRY_VALIDATED)) { + if (!e->flags.entry_validated) { /* Invoke a store abort that should free the memory object */ (ctrlp->callback) (-1, ctrlp->callback_data); xfree(ctrlp); diff --git a/src/store_swapout.cc b/src/store_swapout.cc index 27dd27b111..2e20f02be6 100644 --- a/src/store_swapout.cc +++ b/src/store_swapout.cc @@ -1,6 +1,6 @@ /* - * $Id: store_swapout.cc,v 1.30 1998/09/10 19:50:58 wessels Exp $ + * $Id: store_swapout.cc,v 1.31 1998/09/14 21:28:16 wessels Exp $ * * DEBUG: section 20 Storage Manager Swapout Functions * AUTHOR: Duane Wessels @@ -140,7 +140,7 @@ storeCheckSwapOut(StoreEntry * e) debug(20, 3) ("storeCheckSwapOut: store_status = %s\n", storeStatusStr[e->store_status]); if (e->store_status == STORE_ABORTED) { - assert(EBIT_TEST(e->flag, RELEASE_REQUEST)); + assert(e->flags.release_request); storeSwapOutFileClose(e); return; } @@ -155,7 +155,7 @@ storeCheckSwapOut(StoreEntry * e) #if USE_ASYNC_IO if (mem->inmem_hi < mem->swapout.queue_offset) { storeAbort(e, 0); - assert(EBIT_TEST(e->flag, RELEASE_REQUEST)); + assert(e->flags.release_request); storeSwapOutFileClose(e); return; } @@ -376,5 +376,5 @@ storeSwapOutAble(const StoreEntry * e) if (e->mem_obj->inmem_lo > 0) return 0; /* swapout.fd == -1 && inmem_lo == 0 */ - return EBIT_TEST(e->flag, ENTRY_CACHABLE); + return e->flags.entry_cachable; } diff --git a/src/structs.h b/src/structs.h index 95db79c995..34071bba37 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.220 1998/09/11 17:07:50 wessels Exp $ + * $Id: structs.h,v 1.221 1998/09/14 21:28:17 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -1172,6 +1172,31 @@ struct _MemObject { size_t swap_hdr_sz; }; +struct _store_flags { + /* + * These are for StoreEntry->flag, which is defined as a SHORT + * + * NOTE: These flags are written to swap.state, so think very carefully + * about deleting or re-assigning! + */ + int entry_special:1; + int entry_revalidate:1; + int delay_sending:1; + int release_request:1; + int refresh_request:1; + int entry_cachable:1; + int entry_dispatched:1; + int key_private:1; +#ifndef PPNR_WIP + int entry_unused_08:1; +#else + int entry_fwd_hdr_wait:1; +#endif /* PPNR_WIP */ + int entry_negcached:1; + int entry_validated:1; + int entry_bad_length:1; +}; + struct _StoreEntry { /* first two items must be same as hash_link */ const cache_key *key; @@ -1183,7 +1208,7 @@ struct _StoreEntry { time_t lastmod; size_t swap_file_sz; u_short refcount; - u_short flag; + store_flags flags; int swap_file_number; dlink_node lru; u_short lock_count; /* Assume < 65536! */ @@ -1459,7 +1484,7 @@ struct _storeSwapLogData { time_t lastmod; size_t swap_file_sz; u_short refcount; - u_short flags; + store_flags flags; unsigned char key[MD5_DIGEST_CHARS]; }; diff --git a/src/typedefs.h b/src/typedefs.h index f055992920..e03bc95269 100644 --- a/src/typedefs.h +++ b/src/typedefs.h @@ -1,6 +1,6 @@ /* - * $Id: typedefs.h,v 1.73 1998/08/27 06:28:59 wessels Exp $ + * $Id: typedefs.h,v 1.74 1998/09/14 21:28:18 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -131,6 +131,7 @@ typedef struct _MemObject MemObject; typedef struct _StoreEntry StoreEntry; typedef struct _SwapDir SwapDir; typedef struct _request_flags request_flags; +typedef struct _store_flags store_flags; typedef struct _request_t request_t; typedef struct _AccessLogEntry AccessLogEntry; typedef struct _cachemgr_passwd cachemgr_passwd; diff --git a/src/wais.cc b/src/wais.cc index 26ec837618..0a42a2881c 100644 --- a/src/wais.cc +++ b/src/wais.cc @@ -1,6 +1,6 @@ /* - * $Id: wais.cc,v 1.118 1998/09/04 23:05:06 wessels Exp $ + * $Id: wais.cc,v 1.119 1998/09/14 21:28:19 wessels Exp $ * * DEBUG: section 24 WAIS Relay * AUTHOR: Harvest Derived @@ -131,7 +131,7 @@ waisReadReply(int fd, void *data) waisReadReply, waisState, 0); } else { ErrorState *err; - EBIT_CLR(entry->flag, ENTRY_CACHABLE); + entry->flags.entry_cachable = 0; storeReleaseRequest(entry); err = errorCon(ERR_READ_ERROR, HTTP_INTERNAL_SERVER_ERROR); err->xerrno = errno; @@ -213,7 +213,7 @@ waisSendRequest(int fd, void *data) memBufPrintf(&mb, "\r\n"); debug(24, 6) ("waisSendRequest: buf: %s\n", mb.buf); comm_write_mbuf(fd, mb, waisSendComplete, waisState); - if (EBIT_TEST(waisState->entry->flag, ENTRY_CACHABLE)) + if (waisState->entry->flags.entry_cachable) storeSetPublicKey(waisState->entry); /* Make it public */ }