/*
- * $Id: ICP.h,v 1.6 2003/08/10 11:00:40 robertc Exp $
+ * $Id: ICP.h,v 1.7 2007/04/19 20:21:34 wessels Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
{
public:
- ICPState(icp_common_t &);
+ ICPState(icp_common_t &, HttpRequest *);
virtual ~ ICPState();
icp_common_t header;
HttpRequest *request;
/*
- * $Id: icp_v2.cc,v 1.95 2007/04/13 17:04:00 wessels Exp $
+ * $Id: icp_v2.cc,v 1.96 2007/04/19 20:21:34 wessels Exp $
*
* DEBUG: section 12 Internet Cache Protocol
* AUTHOR: Duane Wessels
/* ICPState */
-ICPState:: ICPState(icp_common_t & aHeader):header(aHeader)
- ,request(NULL),
+ICPState:: ICPState(icp_common_t & aHeader, HttpRequest *aRequest):
+ header(aHeader),
+ request(HTTPMSGLOCK(aRequest)),
fd(-1),
url(NULL)
{}
ICPState::~ICPState()
{
safe_free(url);
-
- if (request)
- delete request;
+ HTTPMSGUNLOCK(request);
}
{
public:
- ICP2State(icp_common_t & aHeader):ICPState(aHeader),rtt(0),src_rtt(0),flags(0)
+ ICP2State(icp_common_t & aHeader, HttpRequest *aRequest):
+ ICPState(aHeader, aRequest),rtt(0),src_rtt(0),flags(0)
{}
~ICP2State();
}
/* The peer is allowed to use this cache */
- ICP2State *state = new ICP2State (header);
+ ICP2State *state = new ICP2State (header, icp_request);
state->fd = fd;
/*
- * $Id: icp_v3.cc,v 1.40 2006/01/19 18:40:28 wessels Exp $
+ * $Id: icp_v3.cc,v 1.41 2007/04/19 20:21:34 wessels Exp $
*
* DEBUG: section 12 Internet Cache Protocol
* AUTHOR: Duane Wessels
{
public:
- ICP3State(icp_common_t &aHeader):ICPState(aHeader){}
+ ICP3State(icp_common_t &aHeader, HttpRequest *aRequest):
+ ICPState(aHeader, aRequest)
+ {}
~ICP3State();
void created (StoreEntry *newEntry);
}
/* The peer is allowed to use this cache */
- ICP3State *state = new ICP3State (header);
-
- state->request = icp_request;
+ ICP3State *state = new ICP3State (header, icp_request);
state->fd = fd;