/*
- * $Id: client_side_request.cci,v 1.3 2003/07/11 01:40:36 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.
return NULL;
}
-ConnStateData::Pointer
+ConnStateData *
ClientHttpRequest::getConn()
{
+ if (!cbdataReferenceValid(conn_))
+ return NULL;
+
return conn_;
}
-ConnStateData::Pointer const
+ConnStateData * const
ClientHttpRequest::getConn() const
{
+ if (!cbdataReferenceValid(conn_))
+ return NULL;
+
return conn_;
}
void
-ClientHttpRequest::setConn(ConnStateData::Pointer aConn)
+ClientHttpRequest::setConn(ConnStateData * aConn)
+{
+ assert (conn_ == NULL || aConn == NULL);
+
+ if (conn_)
+ cbdataReferenceDone(conn_);
+
+ conn_ = cbdataReference(aConn);
+}
+
+StoreEntry *
+ClientHttpRequest::loggingEntry() const
{
- assert (conn_.getRaw() == NULL || aConn.getRaw() == NULL);
- conn_ = aConn;
+ return loggingEntry_;
}