/*
- * $Id: ACLChecklist.cc,v 1.28 2005/10/23 11:55:31 hno Exp $
+ * $Id: ACLChecklist.cc,v 1.29 2005/12/08 20:08:46 wessels Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
if (finished()) {
PROF_stop(aclCheckFast);
+ cbdataReferenceDone(accessList);
return currentAnswer() == ACCESS_ALLOWED;
}
/*
- * $Id: DelayId.cc,v 1.17 2005/09/09 17:31:33 wessels Exp $
+ * $Id: DelayId.cc,v 1.18 2005/12/08 20:08:46 wessels Exp $
*
* DEBUG: section 77 Delay Pools
* AUTHOR: Robert Collins <robertc@squid-cache.org>
ch.accessList = cbdataReference(DelayPools::delay_data[pool].access);
+ /* cbdataReferenceDone() happens in either fastCheck() or ~ACLCheckList */
+
if (DelayPools::delay_data[pool].theComposite().getRaw() &&
ch.fastCheck()) {
- ch.accessList = NULL;
DelayId result (pool + 1);
CompositePoolNode::CompositeSelectionDetails details;
details.src_addr = ch.src_addr;
result.compositePosition(DelayPools::delay_data[pool].theComposite()->id(details));
return result;
}
-
- ch.accessList = NULL;
}
/*
- * $Id: cbdata.cc,v 1.65 2005/11/05 00:08:32 wessels Exp $
+ * $Id: cbdata.cc,v 1.66 2005/12/08 20:08:46 wessels Exp $
*
* DEBUG: section 45 Callback Data Registry
* ORIGINAL AUTHOR: Duane Wessels
c->check(__LINE__);
- assert(c->locks < 65535);
+ assert(c->locks < 655);
c->locks++;
}
/*
- * $Id: client_side.cc,v 1.705 2005/12/06 23:03:34 wessels Exp $
+ * $Id: client_side.cc,v 1.706 2005/12/08 20:08:46 wessels Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
identChecklist.accessList = cbdataReference(Config.accessList.identLookup);
+ /* cbdataReferenceDone() happens in either fastCheck() or ~ACLCheckList */
+
if (identChecklist.fastCheck())
identStart(&details->me, &details->peer, clientIdentDone, connState);
- cbdataReferenceDone(identChecklist.accessList);
-
- identChecklist.accessList = NULL;
#endif
identChecklist.accessList = cbdataReference(Config.accessList.identLookup);
+ /* cbdataReferenceDone() happens in either fastCheck() or ~ACLCheckList */
+
if (identChecklist.fastCheck())
identStart(&details->me, &details->peer, clientIdentDone, connState);
- identChecklist.accessList = NULL;
-
#endif
commSetSelect(newfd, COMM_SELECT_READ, clientNegotiateSSL, connState, 0);
/*
- * $Id: forward.cc,v 1.131 2005/12/06 23:03:34 wessels Exp $
+ * $Id: forward.cc,v 1.132 2005/12/08 20:08:46 wessels Exp $
*
* DEBUG: section 17 Request Forwarding
* AUTHOR: Duane Wessels
ch.my_port = r->my_port;
ch.request = requestLink(r);
ch.accessList = cbdataReference(Config.accessList.miss);
+ /* cbdataReferenceDone() happens in either fastCheck() or ~ACLCheckList */
answer = ch.fastCheck();
- ch.accessList = NULL;
if (answer == 0) {
err_type page_id;
/*
- * $Id: http.cc,v 1.470 2005/12/06 23:03:34 wessels Exp $
+ * $Id: http.cc,v 1.471 2005/12/08 20:08:46 wessels Exp $
*
* DEBUG: section 11 Hypertext Transfer Protocol (HTTP)
* AUTHOR: Harvest Derived
if (Config.accessList.brokenPosts)
ch.accessList = cbdataReference(Config.accessList.brokenPosts);
+ /* cbdataReferenceDone() happens in either fastCheck() or ~ACLCheckList */
+
if (!Config.accessList.brokenPosts) {
debug(11, 5) ("httpSendRequestEntityDone: No brokenPosts list\n");
HttpStateData::SendComplete(fd, NULL, 0, COMM_OK, data);
debug(11, 2) ("httpSendRequestEntityDone: matched brokenPosts\n");
comm_old_write(fd, "\r\n", 2, HttpStateData::SendComplete, data, NULL);
}
-
- ch.accessList = NULL;
}
static void
/*
- * $Id: icp_v2.cc,v 1.87 2005/06/09 16:04:30 serassio Exp $
+ * $Id: icp_v2.cc,v 1.88 2005/12/08 20:08:47 wessels Exp $
*
* DEBUG: section 12 Internet Cache Protocol
* AUTHOR: Duane Wessels
checklist.my_addr = no_addr;
checklist.request = requestLink(icp_request);
checklist.accessList = cbdataReference(Config.accessList.icp);
+ /* cbdataReferenceDone() happens in either fastCheck() or ~ACLCheckList */
int result = checklist.fastCheck();
- checklist.accessList = NULL;
return result;
}
/*
- * $Id: neighbors.cc,v 1.331 2005/06/09 16:04:30 serassio Exp $
+ * $Id: neighbors.cc,v 1.332 2005/12/08 20:08:47 wessels Exp $
*
* DEBUG: section 15 Neighbor Routines
* AUTHOR: Harvest Derived
checklist.accessList = cbdataReference(p->access);
+ /* cbdataReferenceDone() happens in either fastCheck() or ~ACLCheckList */
+
#if 0 && USE_IDENT
/*
* this is currently broken because 'request->user_ident' has been
#endif
- int result = checklist.fastCheck();
-
- checklist.accessList = NULL;
-
- return result;
+ return checklist.fastCheck();
}
/* Return TRUE if it is okay to send an ICP request to this peer. */
/*
- * $Id: snmp_core.cc,v 1.70 2005/12/08 18:33:55 wessels Exp $
+ * $Id: snmp_core.cc,v 1.71 2005/12/08 20:08:47 wessels Exp $
*
* DEBUG: section 49 SNMP support
* AUTHOR: Glenn Chisholm
PDU = snmp_pdu_create(0);
rq->session.Version = SNMP_VERSION_1;
Community = snmp_parse(&rq->session, PDU, buf, len);
- ACLChecklist checklist;
checklist.src_addr = rq->from.sin_addr;
checklist.snmp_community = (char *) Community;
if (Community) {
+ ACLChecklist checklist;
checklist.accessList = cbdataReference(Config.accessList.snmp);
+ /* cbdataReferenceDone() happens in either fastCheck() or ~ACLCheckList */
allow = checklist.fastCheck();
- checklist.accessList = NULL;
}
if ((snmp_coexist_V2toV1(PDU)) && (Community) && (allow)) {
/*
- * $Id: tunnel.cc,v 1.155 2005/12/01 21:35:40 serassio Exp $
+ * $Id: tunnel.cc,v 1.156 2005/12/08 20:08:47 wessels Exp $
*
* DEBUG: section 26 Secure Sockets Layer Proxy
* AUTHOR: Duane Wessels
ch.my_port = request->my_port;
ch.request = requestLink(request);
ch.accessList = cbdataReference(Config.accessList.miss);
+ /* cbdataReferenceDone() happens in either fastCheck() or ~ACLCheckList */
answer = ch.fastCheck();
- ch.accessList = NULL;
if (answer == 0) {
err = errorCon(ERR_FORWARDING_DENIED, HTTP_FORBIDDEN);