]> git.ipfire.org Git - thirdparty/squid.git/blob - src/ExternalACLEntry.cc
Source Format Enforcement (#1234)
[thirdparty/squid.git] / src / ExternalACLEntry.cc
1 /*
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
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
9 /* DEBUG: section 82 External ACL */
10
11 #include "squid.h"
12 #include "ExternalACLEntry.h"
13 #include "time/gadgets.h"
14
15 /******************************************************************
16 * external_acl cache
17 */
18
19 ExternalACLEntry::ExternalACLEntry() :
20 notes()
21 {
22 lru.next = lru.prev = nullptr;
23 result = ACCESS_DENIED;
24 date = 0;
25 def = nullptr;
26 }
27
28 ExternalACLEntry::~ExternalACLEntry()
29 {
30 safe_free(key);
31 }
32
33 void
34 ExternalACLEntry::update(ExternalACLEntryData const &someData)
35 {
36 date = squid_curtime;
37 result = someData.result;
38
39 // replace all notes. not combine
40 notes.clear();
41 notes.append(&someData.notes);
42
43 #if USE_AUTH
44 user = someData.user;
45 password = someData.password;
46 #endif
47 message = someData.message;
48 tag = someData.tag;
49 log = someData.log;
50 }
51