]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Summary: BUGFIX: ConnStateData needs to own itself.
authorrobertc <>
Fri, 11 Jul 2003 08:11:47 +0000 (08:11 +0000)
committerrobertc <>
Fri, 11 Jul 2003 08:11:47 +0000 (08:11 +0000)
Keywords:

* I forgot to give ConnStateData a reference to itself, for persistent connections.

src/client_side.cc
src/client_side.h

index 63786f81f79c2d5a104ff22bf553516b8bcb0cad..8da63f853cb5d92e3827f20917ca42ab9e20df4d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.648 2003/07/11 01:40:36 robertc Exp $
+ * $Id: client_side.cc,v 1.649 2003/07/11 02:11:47 robertc Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -611,7 +611,7 @@ void
 ConnStateData::close()
 {
     debug(33, 3) ("ConnStateData::close: FD %d\n", fd);
-    open_ = false;
+    openReference = NULL;
     clientdbEstablished(peer.sin_addr, -1);    /* decrement */
     assert(areAllContextsForThisConnection());
     freeAllContexts();
@@ -621,7 +621,7 @@ ConnStateData::close()
 bool
 ConnStateData::isOpen() const
 {
-    return open_;
+    return openReference.getRaw() != NULL;
 }
 
 ConnStateData::~ConnStateData()
@@ -3078,7 +3078,7 @@ ConnStateData::deleteSelf () const
     delete this;
 }
 
-ConnStateData::ConnStateData() : transparent_ (false), reading_ (false), open_(true)
+ConnStateData::ConnStateData() : transparent_ (false), reading_ (false), openReference (this)
 {}
 
 bool
index 90c13ab0e9ffad7790a43e1ed3d220149e4d62ff..72185f5f1de4857041e1fba25e342fc42f9564ae 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.h,v 1.3 2003/07/11 01:40:36 robertc Exp $
+ * $Id: client_side.h,v 1.4 2003/07/11 02:11:47 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -201,7 +201,7 @@ private:
     CBDATA_CLASS(ConnStateData);
     bool transparent_;
     bool reading_;
-    bool open_;
+    Pointer openReference;
 };
 
 #endif /* SQUID_CLIENTSIDE_H */