From: robertc <> Date: Fri, 11 Jul 2003 08:11:47 +0000 (+0000) Subject: Summary: BUGFIX: ConnStateData needs to own itself. X-Git-Tag: SQUID_3_0_PRE1~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7ce98c673785a18df09a7b716a96dca939321a1c;p=thirdparty%2Fsquid.git Summary: BUGFIX: ConnStateData needs to own itself. Keywords: * I forgot to give ConnStateData a reference to itself, for persistent connections. --- diff --git a/src/client_side.cc b/src/client_side.cc index 63786f81f7..8da63f853c 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -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 diff --git a/src/client_side.h b/src/client_side.h index 90c13ab0e9..72185f5f1d 100644 --- a/src/client_side.h +++ b/src/client_side.h @@ -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 */