From: robertc <> Date: Sun, 10 Aug 2003 11:11:22 +0000 (+0000) Subject: Summary: Forward port removing MemObject->fd. X-Git-Tag: SQUID_3_0_PRE3~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9cdee68d68eb1f2862ce70b823e4c7bb8507503c;p=thirdparty%2Fsquid.git Summary: Forward port removing MemObject->fd. Keywords: Bug #94 is solved by removing the MemObject->fd variable. Much of this was already in 3.0, but the remainder wasn't. --- diff --git a/src/MemObject.cc b/src/MemObject.cc index 7871b13e02..77aed17c5f 100644 --- a/src/MemObject.cc +++ b/src/MemObject.cc @@ -1,6 +1,6 @@ /* - * $Id: MemObject.cc,v 1.11 2003/08/03 10:37:30 robertc Exp $ + * $Id: MemObject.cc,v 1.12 2003/08/10 05:11:22 robertc Exp $ * * DEBUG: section 19 Store Memory Primitives * AUTHOR: Robert Collins @@ -106,7 +106,6 @@ MemObject::MemObject(char const *aUrl, char const *aLog_url) : log_url = xstrdup(aLog_url); object_sz = -1; - fd = -1; /* XXX account log_url */ debug(20, 3) ("MemObject::MemObject: initialized %p\n", this); } @@ -125,11 +124,14 @@ MemObject::~MemObject() data_hdr.freeContent(); +#if 0 /* * There is no way to abort FD-less clients, so they might - * still have mem->clients set if mem->fd == -1 + * still have mem->clients set. */ - assert(fd == -1 || clients.head == NULL); + assert(clients.head == NULL); + +#endif httpReplyDestroy((HttpReply *)_reply); diff --git a/src/MemObject.h b/src/MemObject.h index cb7e7bf555..5833ecfb98 100644 --- a/src/MemObject.h +++ b/src/MemObject.h @@ -1,6 +1,6 @@ /* - * $Id: MemObject.h,v 1.6 2003/07/12 07:22:09 robertc Exp $ + * $Id: MemObject.h,v 1.7 2003/08/10 05:11:22 robertc Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -117,7 +117,6 @@ public: struct timeval start_ping; IRCB *ping_reply_callback; void *ircb_data; - int fd; /* FD of client creating this entry */ struct { diff --git a/src/forward.cc b/src/forward.cc index 42a9bb1284..8ec1a882b7 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -1,6 +1,6 @@ /* - * $Id: forward.cc,v 1.107 2003/07/14 14:16:00 robertc Exp $ + * $Id: forward.cc,v 1.108 2003/08/10 05:11:22 robertc Exp $ * * DEBUG: section 17 Request Forwarding * AUTHOR: Duane Wessels @@ -866,7 +866,6 @@ fwdStart(int fd, StoreEntry * e, request_t * r) debug(17, 3) ("fwdStart: '%s'\n", storeUrl(e)); e->mem_obj->request = requestLink(r); - e->mem_obj->fd = fd; #if URL_CHECKSUM_DEBUG e->mem_obj->checkUrlChecksum(); diff --git a/src/protos.h b/src/protos.h index ebfe540abf..c530cd9bd8 100644 --- a/src/protos.h +++ b/src/protos.h @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.487 2003/08/04 22:14:42 robertc Exp $ + * $Id: protos.h,v 1.488 2003/08/10 05:11:22 robertc Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -299,7 +299,6 @@ SQUIDCEXTERN mb_size_t httpBuildRequestPrefix(request_t * request, request_t * orig_request, StoreEntry * entry, MemBuf * mb, - int cfd, http_state_flags); SQUIDCEXTERN void httpAnonInitModule(void); SQUIDCEXTERN int httpAnonHdrAllowed(http_hdr_type hdr_id); diff --git a/src/store_client.cc b/src/store_client.cc index 7480af7d5c..c784d810c2 100644 --- a/src/store_client.cc +++ b/src/store_client.cc @@ -1,6 +1,6 @@ /* - * $Id: store_client.cc,v 1.132 2003/07/28 09:27:28 robertc Exp $ + * $Id: store_client.cc,v 1.133 2003/08/10 05:11:22 robertc Exp $ * * DEBUG: section 90 Storage Manager Client-Side Interface * AUTHOR: Duane Wessels @@ -659,14 +659,6 @@ storeUnregister(store_client * sc, StoreEntry * e, void *data) return 0; } - if (mem->clientIsFirst(sc)) { - /* - * If we are unregistering the _first_ client for this - * entry, then we have to reset the client FD to -1. - */ - mem->fd = -1; - } - dlinkDelete(&sc->node, &mem->clients); mem->nclients--;