From: Francesco Chemolli Date: Wed, 5 Sep 2012 14:49:29 +0000 (+0200) Subject: Renamed acl_deny_info_list to AclDenyInfoList and moved to own header file in acl/ X-Git-Tag: sourceformat-review-1~6^2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f0b3324a34763ddc945b3f5fb9f137c16b94259;p=thirdparty%2Fsquid.git Renamed acl_deny_info_list to AclDenyInfoList and moved to own header file in acl/ --- diff --git a/src/SquidConfig.h b/src/SquidConfig.h index 835cc3e4f9..1983dcf3b2 100644 --- a/src/SquidConfig.h +++ b/src/SquidConfig.h @@ -46,7 +46,7 @@ #endif class acl_access; -class acl_deny_info_list; +class AclDenyInfoList; class acl_size_t; class HeaderManglers; class refresh_t; @@ -389,7 +389,7 @@ public: acl_access* icap; #endif } accessList; - acl_deny_info_list *denyInfoList; + AclDenyInfoList *denyInfoList; struct { size_t list_width; diff --git a/src/acl/AclDenyInfoList.h b/src/acl/AclDenyInfoList.h new file mode 100644 index 0000000000..e878970ec0 --- /dev/null +++ b/src/acl/AclDenyInfoList.h @@ -0,0 +1,47 @@ +#ifndef SQUID_ACLDENYINFOLIST_H_ +#define SQUID_ACLDENYINFOLIST_H_ +/* + * DEBUG: section + * AUTHOR: + * + * SQUID Web Proxy Cache http://www.squid-cache.org/ + * ---------------------------------------------------------- + * + * Squid is the result of efforts by numerous individuals from + * the Internet community; see the CONTRIBUTORS file for full + * details. Many organizations have provided support for Squid's + * development; see the SPONSORS file for full details. Squid is + * Copyrighted (C) 2001 by the Regents of the University of + * California; see the COPYRIGHT file for full details. Squid + * incorporates software developed and/or copyrighted by other + * sources; see the CREDITS file for full details. + * + * This program is free software; you can redistribute it and/or modify + * 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. + * + */ + +#include "err_type.h" +#include "acl/AclNameList.h" + +class AclDenyInfoList { +public: + err_type err_page_id; + char *err_page_name; + AclNameList *acl_list; + AclDenyInfoList *next; +}; + + +#endif /* SQUID_ACLDENYINFOLIST_H_ */ diff --git a/src/acl/Gadgets.cc b/src/acl/Gadgets.cc index b06363ca84..f6fd6ba3cb 100644 --- a/src/acl/Gadgets.cc +++ b/src/acl/Gadgets.cc @@ -39,6 +39,7 @@ #include "squid.h" #include "acl/Acl.h" #include "acl/AclNameList.h" +#include "acl/AclDenyInfoList.h" #include "acl/Checklist.h" #include "acl/Strategised.h" #include "acl/Gadgets.h" @@ -50,9 +51,9 @@ /* does name lookup, returns page_id */ err_type -aclGetDenyInfoPage(acl_deny_info_list ** head, const char *name, int redirect_allowed) +aclGetDenyInfoPage(AclDenyInfoList ** head, const char *name, int redirect_allowed) { - acl_deny_info_list *A = NULL; + AclDenyInfoList *A = NULL; debugs(28, 8, HERE << "got called for " << name); @@ -107,12 +108,12 @@ aclIsProxyAuth(const char *name) */ void -aclParseDenyInfoLine(acl_deny_info_list ** head) +aclParseDenyInfoLine(AclDenyInfoList ** head) { char *t = NULL; - acl_deny_info_list *A = NULL; - acl_deny_info_list *B = NULL; - acl_deny_info_list **T = NULL; + AclDenyInfoList *A = NULL; + AclDenyInfoList *B = NULL; + AclDenyInfoList **T = NULL; AclNameList *L = NULL; AclNameList **Tail = NULL; @@ -124,10 +125,10 @@ aclParseDenyInfoLine(acl_deny_info_list ** head) return; } - A = (acl_deny_info_list *)memAllocate(MEM_ACL_DENY_INFO_LIST); + A = (AclDenyInfoList *)memAllocate(MEM_ACL_DENY_INFO_LIST); A->err_page_id = errorReservePageId(t); A->err_page_name = xstrdup(t); - A->next = (acl_deny_info_list *) NULL; + A->next = (AclDenyInfoList *) NULL; /* next expect a list of ACL names */ Tail = &A->acl_list; @@ -281,13 +282,13 @@ aclDestroyAccessList(acl_access ** list) } /* maex@space.net (06.09.1996) - * destroy an acl_deny_info_list */ + * destroy an AclDenyInfoList */ void -aclDestroyDenyInfoList(acl_deny_info_list ** list) +aclDestroyDenyInfoList(AclDenyInfoList ** list) { - acl_deny_info_list *a = NULL; - acl_deny_info_list *a_next = NULL; + AclDenyInfoList *a = NULL; + AclDenyInfoList *a_next = NULL; AclNameList *l = NULL; AclNameList *l_next = NULL; diff --git a/src/acl/Gadgets.h b/src/acl/Gadgets.h index 38214f546d..aadee84571 100644 --- a/src/acl/Gadgets.h +++ b/src/acl/Gadgets.h @@ -4,12 +4,12 @@ #include "err_type.h" struct dlink_list; -class StoreEntry; -class ConfigParser; class acl_access; class ACL; +class AclDenyInfoList; class ACLList; -struct acl_deny_info_list; +class ConfigParser; +class StoreEntry; class wordlist; /// \ingroup ACLAPI @@ -25,11 +25,11 @@ extern void aclParseAclList(ConfigParser &parser, ACLList **); /// \ingroup ACLAPI extern int aclIsProxyAuth(const char *name); /// \ingroup ACLAPI -extern err_type aclGetDenyInfoPage(acl_deny_info_list ** head, const char *name, int redirect_allowed); +extern err_type aclGetDenyInfoPage(AclDenyInfoList ** head, const char *name, int redirect_allowed); /// \ingroup ACLAPI -extern void aclParseDenyInfoLine(acl_deny_info_list **); +extern void aclParseDenyInfoLine(AclDenyInfoList **); /// \ingroup ACLAPI -extern void aclDestroyDenyInfoList(acl_deny_info_list **); +extern void aclDestroyDenyInfoList(AclDenyInfoList **); /// \ingroup ACLAPI extern wordlist *aclDumpGeneric(const ACL *); /// \ingroup ACLAPI diff --git a/src/acl/Makefile.am b/src/acl/Makefile.am index 580eed0b7c..500018d89c 100644 --- a/src/acl/Makefile.am +++ b/src/acl/Makefile.am @@ -106,6 +106,7 @@ libacls_la_SOURCES = \ UserData.h \ \ AclNameList.h \ + AclDenyInfoList.h \ Gadgets.cc \ Gadgets.h diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 9078686fe1..c847a9c324 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -32,6 +32,7 @@ #include "squid.h" #include "acl/Acl.h" +#include "acl/AclDenyInfoList.h" #include "acl/AclNameList.h" #include "acl/Gadgets.h" #include "acl/MethodData.h" @@ -211,9 +212,9 @@ static void parse_http_header_replace(HeaderManglers **manglers); static void dump_HeaderWithAclList(StoreEntry * entry, const char *name, HeaderWithAclList *headers); static void parse_HeaderWithAclList(HeaderWithAclList **header); static void free_HeaderWithAclList(HeaderWithAclList **header); -static void parse_denyinfo(acl_deny_info_list ** var); -static void dump_denyinfo(StoreEntry * entry, const char *name, acl_deny_info_list * var); -static void free_denyinfo(acl_deny_info_list ** var); +static void parse_denyinfo(AclDenyInfoList ** var); +static void dump_denyinfo(StoreEntry * entry, const char *name, AclDenyInfoList * var); +static void free_denyinfo(AclDenyInfoList ** var); #if USE_WCCPv2 static void parse_IpAddress_list(Ip::Address_list **); @@ -2436,7 +2437,7 @@ free_cachemgrpasswd(cachemgr_passwd ** head) } static void -dump_denyinfo(StoreEntry * entry, const char *name, acl_deny_info_list * var) +dump_denyinfo(StoreEntry * entry, const char *name, AclDenyInfoList * var) { AclNameList *a; @@ -2453,16 +2454,16 @@ dump_denyinfo(StoreEntry * entry, const char *name, acl_deny_info_list * var) } static void -parse_denyinfo(acl_deny_info_list ** var) +parse_denyinfo(AclDenyInfoList ** var) { aclParseDenyInfoLine(var); } void -free_denyinfo(acl_deny_info_list ** list) +free_denyinfo(AclDenyInfoList ** list) { - acl_deny_info_list *a = NULL; - acl_deny_info_list *a_next = NULL; + AclDenyInfoList *a = NULL; + AclDenyInfoList *a_next = NULL; AclNameList *l = NULL; AclNameList *l_next = NULL; diff --git a/src/globals.h b/src/globals.h index 8997454cf2..f91d085a1e 100644 --- a/src/globals.h +++ b/src/globals.h @@ -40,6 +40,7 @@ #include "defines.h" /* for iostats */ +#include "acl/AclDenyInfoList.h" #include "structs.h" extern char *ConfigFile; /* NULL */ @@ -87,7 +88,7 @@ extern int DnsSocketB; /* -1 */ extern int n_disk_objects; /* 0 */ extern iostats IOStats; -extern struct acl_deny_info_list *DenyInfoList; /* NULL */ +extern AclDenyInfoList *DenyInfoList; /* NULL */ extern struct timeval squid_start; extern int starting_up; /* 1 */ diff --git a/src/mem.cc b/src/mem.cc index dec2049092..d68030d7f0 100644 --- a/src/mem.cc +++ b/src/mem.cc @@ -31,6 +31,7 @@ */ #include "squid.h" +#include "acl/AclDenyInfoList.h" #include "acl/AclNameList.h" #include "ClientInfo.h" #include "event.h" @@ -450,8 +451,8 @@ Mem::Init(void) memDataInit(MEM_16K_BUF, "16K Buffer", 16384, 10, false); memDataInit(MEM_32K_BUF, "32K Buffer", 32768, 10, false); memDataInit(MEM_64K_BUF, "64K Buffer", 65536, 10, false); - memDataInit(MEM_ACL_DENY_INFO_LIST, "acl_deny_info_list", - sizeof(acl_deny_info_list), 0); + memDataInit(MEM_ACL_DENY_INFO_LIST, "AclDenyInfoList", + sizeof(AclDenyInfoList), 0); memDataInit(MEM_ACL_NAME_LIST, "acl_name_list", sizeof(AclNameList), 0); #if USE_CACHE_DIGESTS diff --git a/src/structs.h b/src/structs.h index 3b4b1dd103..f3d192a001 100644 --- a/src/structs.h +++ b/src/structs.h @@ -47,13 +47,6 @@ #define PEER_MULTICAST_SIBLINGS 1 -struct acl_deny_info_list { - err_type err_page_id; - char *err_page_name; - AclNameList *acl_list; - acl_deny_info_list *next; -}; - class ACLChecklist; #if SQUID_SNMP