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