You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2012/12/13 07:45:02 UTC
[4/7] git commit: Make CongestionMatcherTable a private type
Make CongestionMatcherTable a private type
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/91a27f02
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/91a27f02
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/91a27f02
Branch: refs/heads/master
Commit: 91a27f02ecbe72d59037f4844f1cf6ea7aa609f2
Parents: 1173c3d
Author: James Peach <jp...@apache.org>
Authored: Tue Dec 4 20:40:42 2012 -0800
Committer: James Peach <jp...@apache.org>
Committed: Wed Dec 12 22:05:10 2012 -0800
----------------------------------------------------------------------
proxy/congest/Congestion.cc | 4 +++-
proxy/congest/Congestion.h | 13 +------------
2 files changed, 4 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/91a27f02/proxy/congest/Congestion.cc
----------------------------------------------------------------------
diff --git a/proxy/congest/Congestion.cc b/proxy/congest/Congestion.cc
index 4dfc255..790c02d 100644
--- a/proxy/congest/Congestion.cc
+++ b/proxy/congest/Congestion.cc
@@ -72,8 +72,10 @@ int DEFAULT_congestion_scheme = PER_IP;
#define CONG_RULE_ULIMITED_max_connection_failures -1
#define CONG_RULE_ULIMITED_mac_connection -1
+typedef ControlMatcher<CongestionControlRecord, CongestionControlRule> CongestionMatcherTable;
+
+static CongestionMatcherTable *CongestionMatcher = NULL;
static Ptr<ProxyMutex> reconfig_mutex;
-CongestionMatcherTable *CongestionMatcher = NULL;
int congestionControlEnabled = 0;
int congestionControlLocalTime = 0;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/91a27f02/proxy/congest/Congestion.h
----------------------------------------------------------------------
diff --git a/proxy/congest/Congestion.h b/proxy/congest/Congestion.h
index 6496601..2fca055 100644
--- a/proxy/congest/Congestion.h
+++ b/proxy/congest/Congestion.h
@@ -464,20 +464,9 @@ uint64_t make_key(char *hostname, int len, sockaddr const* ip, char *prefix, int
//----------------------------------------------------
extern Action *get_congest_entry(Continuation * cont, HttpRequestData * data, CongestionEntry ** ppEntry);
extern Action *get_congest_list(Continuation * cont, MIOBuffer * buffer, int format);
-extern void remove_congested_entry(uint64_t key);
+extern void remove_congested_entry(uint64_t key);
extern void remove_all_congested_entry(void);
-
extern void remove_congested_entry(char *buf, MIOBuffer * out_buffer);
-typedef ControlMatcher<CongestionControlRecord, CongestionControlRule> CongestionMatcherTable;
-extern CongestionMatcherTable *CongestionMatcher;
-
-inline bool
-host_rule_in_CongestMatcher()
-{
- return (congestionControlEnabled && CongestionMatcher &&
- (CongestionMatcher->hostMatch || CongestionMatcher->hrMatch));
-}
-
#endif /* CONGESTTION_H_ */