]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/CachePeer.cc
2e8193754afa0bca85bbfc922f82c81d08b426bf
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
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.
10 #include "acl/Gadgets.h"
11 #include "CachePeer.h"
13 #include "NeighborTypeDomainList.h"
15 #include "PeerPoolMgr.h"
17 CBDATA_CLASS_INIT(CachePeer
);
19 CachePeer::CachePeer() :
24 http_port(CACHE_HTTP_PORT
),
40 connect_fail_limit(0),
48 connection_auth(2 /* auto */)
50 memset(&stats
, 0, sizeof(stats
));
51 stats
.logged_state
= PEER_ALIVE
;
53 memset(&icp
, 0, sizeof(icp
));
54 icp
.port
= CACHE_ICP_PORT
;
55 icp
.version
= ICP_VERSION_CURRENT
;
58 memset(&htcp
, 0, sizeof(htcp
));
60 memset(&options
, 0, sizeof(options
));
61 memset(&mcast
, 0, sizeof(mcast
));
62 memset(&carp
, 0, sizeof(carp
));
64 memset(&userhash
, 0, sizeof(userhash
));
66 memset(&sourcehash
, 0, sizeof(sourcehash
));
70 standby
.waitingForClose
= false;
73 CachePeer::~CachePeer()
78 while (NeighborTypeDomainList
*l
= typelist
) {
84 aclDestroyAccessList(&access
);
87 cbdataReferenceDone(digest
);
97 // the mgr job will notice that its owner is gone and stop
98 PeerPoolMgr::Checkpoint(standby
.mgr
, "peer gone");
104 SSL_CTX_free(sslContext
);
107 SSL_SESSION_free(sslSession
);