CachePeer.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2020 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 #include "squid.h"
10 #include "acl/Gadgets.h"
11 #include "CachePeer.h"
12 #include "defines.h"
13 #include "NeighborTypeDomainList.h"
14 #include "pconn.h"
15 #include "PeerPoolMgr.h"
16 #include "SquidConfig.h"
17 
19 
21 {
22  xfree(name);
23  xfree(host);
24 
25  while (NeighborTypeDomainList *l = typelist) {
26  typelist = l->next;
27  xfree(l->domain);
28  xfree(l);
29  }
30 
32 
33 #if USE_CACHE_DIGESTS
36 #endif
37 
38  delete next;
39 
40  xfree(login);
41 
42  delete standby.pool;
43 
44  // the mgr job will notice that its owner is gone and stop
45  PeerPoolMgr::Checkpoint(standby.mgr, "peer gone");
46 
47  xfree(domain);
48 }
49 
50 time_t
52 {
53  if (connect_timeout_raw > 0)
54  return connect_timeout_raw;
56 }
57 
PeerDigest * digest
Definition: CachePeer.h:142
acl_access * access
Definition: CachePeer.h:79
char * login
Definition: CachePeer.h:174
time_t connectTimeout() const
Definition: CachePeer.cc:51
char * name
Definition: CachePeer.h:39
char * domain
Forced domain.
Definition: CachePeer.h:187
NeighborTypeDomainList * typelist
Definition: CachePeer.h:78
~CachePeer()
Definition: CachePeer.cc:20
representation of a neighbor_type_domain configuration directive. A POD
time_t peer_connect
Definition: SquidConfig.h:114
#define cbdataReferenceDone(var)
Definition: cbdata.h:350
#define CBDATA_CLASS_INIT(type)
Definition: cbdata.h:318
#define xfree
struct CachePeer::@36 standby
optional "cache_peer standby=limit" feature
void aclDestroyAccessList(acl_access **list)
Definition: Gadgets.cc:276
NeighborTypeDomainList * next
char * host
Definition: CachePeer.h:40
time_t connect_timeout_raw
connect_timeout; use connectTimeout() instead!
Definition: CachePeer.h:175
struct SquidConfig::@98 Timeout
CachePeer * next
Definition: CachePeer.h:153
static void Checkpoint(const Pointer &mgr, const char *reason)
Definition: PeerPoolMgr.cc:261
class SquidConfig Config
Definition: SquidConfig.cc:12
char * digest_url
Definition: CachePeer.h:143

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors