]>
Commit | Line | Data |
---|---|---|
bbc27441 | 1 | /* |
2cd0bda2 | 2 | * Copyright (C) 1996-2017 The Squid Software Foundation and contributors |
bbc27441 AJ |
3 | * |
4 | * Squid software is distributed under GPLv2+ license and includes | |
5 | * contributions from numerous individuals and organizations. | |
6 | * Please see the COPYING and CONTRIBUTORS files for details. | |
7 | */ | |
8 | ||
c302ddb5 CT |
9 | #include "squid.h" |
10 | #include "acl/AdaptationServiceData.h" | |
11 | #include "acl/Checklist.h" | |
12 | #include "adaptation/Config.h" | |
13 | #include "adaptation/ecap/Config.h" | |
14 | #include "adaptation/icap/Config.h" | |
15 | #include "adaptation/Service.h" | |
16 | #include "adaptation/ServiceGroups.h" | |
17 | #include "cache_cf.h" | |
18 | #include "ConfigParser.h" | |
19 | #include "Debug.h" | |
c302ddb5 CT |
20 | |
21 | void | |
22 | ACLAdaptationServiceData::parse() | |
23 | { | |
24 | Adaptation::Config::needHistory = true; | |
25 | while (char *t = ConfigParser::strtokFile()) { | |
26 | if ( | |
27 | #if USE_ECAP | |
28 | Adaptation::Ecap::TheConfig.findServiceConfig(t) == NULL && | |
29 | #endif | |
30 | #if ICAP_CLIENT | |
31 | Adaptation::Icap::TheConfig.findServiceConfig(t) == NULL && | |
32 | #endif | |
33 | Adaptation::FindGroup(t) == NULL) { | |
34 | debugs(28, DBG_CRITICAL, "FATAL: Adaptation service/group " << t << " in adaptation_service acl is not defined"); | |
35 | self_destruct(); | |
36 | } | |
37 | insert(t); | |
38 | } | |
39 | } | |
40 | ||
41 | ACLData<char const *> * | |
42 | ACLAdaptationServiceData::clone() const | |
43 | { | |
44 | return new ACLAdaptationServiceData(*this); | |
45 | } | |
46 |