From: Alex Rousskov Date: Mon, 2 Dec 2013 00:36:24 +0000 (-0700) Subject: Documented that ACLs should be refcounted. X-Git-Tag: SQUID_3_5_0_1~479 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=928a53d697302429da4f956de30ef0dfdb38df92;p=thirdparty%2Fsquid.git Documented that ACLs should be refcounted. Refcounting would avoid ACL destruction problems (when some ACLs use other ACLs or when an ACL goes async during reconfigure) and may even reduce problems with AclMatchedName. --- diff --git a/src/acl/Acl.h b/src/acl/Acl.h index 6b82937f44..dc61d568f4 100644 --- a/src/acl/Acl.h +++ b/src/acl/Acl.h @@ -135,7 +135,7 @@ public: char name[ACL_NAME_SZ]; char *cfgline; - ACL *next; + ACL *next; // XXX: remove or at least use refcounting ACLFlags flags; ///< The list of given ACL flags bool registered; ///< added to Config.aclList and can be reused via by FindByName() @@ -244,6 +244,7 @@ public: MEMPROXY_CLASS_INLINE(acl_proxy_auth_match_cache); /// \ingroup ACLAPI +/// XXX: find a way to remove or at least use a refcounted ACL pointer extern const char *AclMatchedName; /* NULL */ #endif /* SQUID_ACL_H */ diff --git a/src/acl/InnerNode.h b/src/acl/InnerNode.h index 6f3b14446b..bd20dd5d25 100644 --- a/src/acl/InnerNode.h +++ b/src/acl/InnerNode.h @@ -40,6 +40,7 @@ protected: /* ACL API */ virtual int match(ACLChecklist *checklist); + // XXX: use refcounting instead of raw pointers std::vector nodes; ///< children nodes of this intermediate node };