]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Summary: Forward port removing MemObject->fd.
authorrobertc <>
Sun, 10 Aug 2003 11:11:22 +0000 (11:11 +0000)
committerrobertc <>
Sun, 10 Aug 2003 11:11:22 +0000 (11:11 +0000)
Keywords:

Bug #94 is solved by removing the MemObject->fd variable. Much of this was already in 3.0, but the remainder wasn't.

src/MemObject.cc
src/MemObject.h
src/forward.cc
src/protos.h
src/store_client.cc

index 7871b13e02082fa46e9eb2f08f327e472cc8fe48..77aed17c5fd5e868aff3961ea0ae89aa262191d3 100644 (file)
@@ -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);
 
index cb7e7bf5559e14540b3d428e3a1b8222c1b99790..5833ecfb9899ff96501ef8ae319ce9a3cf8de888 100644 (file)
@@ -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
     {
index 42a9bb1284b25fa609361a89ed5d89999b79a369..8ec1a882b7698b87052064287378042a0ae7ad5a 100644 (file)
@@ -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();
index ebfe540abfb08163cfddc40dc0005ab9a4f116cf..c530cd9bd83bb0a7bd45e900217d0f70050cac09 100644 (file)
@@ -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);
index 7480af7d5c8bfbf701f14a4e10909f87423d746b..c784d810c2e5db3613d2b847427fc6b66fab798a 100644 (file)
@@ -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--;