]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/client_side_request.cci
Cleanup: zap CVS Id tags
[thirdparty/squid.git] / src / client_side_request.cci
index 5660d800f16f92167057ed81e18b9d081f1bba55..a9a043853efe3426bcd2cbe5784b59e9a7d8e5fb 100644 (file)
@@ -1,9 +1,9 @@
 
 /*
- * $Id: client_side_request.cci,v 1.2 2003/07/10 11:04:06 robertc Exp $
+ * $Id$
  *
  * DEBUG: section 85    Client-side Request Routines
- * AUTHOR: Robert Collins 
+ * AUTHOR: Robert Collins
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
  * ----------------------------------------------------------
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
@@ -52,18 +52,34 @@ ClientHttpRequest::memObject() const
 ConnStateData *
 ClientHttpRequest::getConn()
 {
+    if (!cbdataReferenceValid(conn_))
+        return NULL;
+
     return conn_;
 }
 
-ConnStateData const *
+ConnStateData * const
 ClientHttpRequest::getConn() const
 {
+    if (!cbdataReferenceValid(conn_))
+        return NULL;
+
     return conn_;
 }
 
 void
-ClientHttpRequest::setConn(ConnStateData *aConn)
+ClientHttpRequest::setConn(ConnStateData * aConn)
+{
+    assert (conn_ == NULL || aConn == NULL);
+
+    if (conn_)
+        cbdataReferenceDone(conn_);
+
+    conn_ = cbdataReference(aConn);
+}
+
+StoreEntry *
+ClientHttpRequest::loggingEntry() const
 {
-    assert (!conn_ || !aConn);
-    conn_ = aConn;
+    return loggingEntry_;
 }