You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2015/12/21 20:45:02 UTC

[11/16] trafficserver git commit: TS-3418: clang-format

TS-3418: clang-format


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/d64434ea
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/d64434ea
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/d64434ea

Branch: refs/heads/6.1.x
Commit: d64434ea0f31459c40352670d99d8e6ea05c2e7c
Parents: 392c34f
Author: Bryan Call <bc...@apache.org>
Authored: Fri Dec 18 09:54:25 2015 -0800
Committer: Bryan Call <bc...@apache.org>
Committed: Fri Dec 18 09:54:25 2015 -0800

----------------------------------------------------------------------
 lib/ts/ConsistentHash.h   | 7 +++----
 proxy/ParentRoundRobin.cc | 7 ++++---
 proxy/ParentSelection.cc  | 4 ++--
 proxy/ParentSelection.h   | 4 ++--
 4 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d64434ea/lib/ts/ConsistentHash.h
----------------------------------------------------------------------
diff --git a/lib/ts/ConsistentHash.h b/lib/ts/ConsistentHash.h
index 5c1332b..dbfd6c3 100644
--- a/lib/ts/ConsistentHash.h
+++ b/lib/ts/ConsistentHash.h
@@ -49,10 +49,9 @@ typedef std::map<uint64_t, ATSConsistentHashNode *>::iterator ATSConsistentHashI
 struct ATSConsistentHash {
   ATSConsistentHash(int r = 1024, ATSHash64 *h = NULL);
   void insert(ATSConsistentHashNode *node, float weight = 1.0, ATSHash64 *h = NULL);
-  ATSConsistentHashNode *lookup(const char *url = NULL, ATSConsistentHashIter *i = NULL, bool *w = NULL,
-                                ATSHash64 *h = NULL);
-  ATSConsistentHashNode *lookup_available(const char *url = NULL, ATSConsistentHashIter *i = NULL,
-                                          bool *w = NULL, ATSHash64 *h = NULL);
+  ATSConsistentHashNode *lookup(const char *url = NULL, ATSConsistentHashIter *i = NULL, bool *w = NULL, ATSHash64 *h = NULL);
+  ATSConsistentHashNode *lookup_available(const char *url = NULL, ATSConsistentHashIter *i = NULL, bool *w = NULL,
+                                          ATSHash64 *h = NULL);
   ATSConsistentHashNode *lookup_by_hashval(uint64_t hashval, ATSConsistentHashIter *i = NULL, bool *w = NULL);
   ~ATSConsistentHash();
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d64434ea/proxy/ParentRoundRobin.cc
----------------------------------------------------------------------
diff --git a/proxy/ParentRoundRobin.cc b/proxy/ParentRoundRobin.cc
index 7971087..03d3c6b 100644
--- a/proxy/ParentRoundRobin.cc
+++ b/proxy/ParentRoundRobin.cc
@@ -45,7 +45,9 @@ ParentRoundRobin::ParentRoundRobin(ParentRecord *parent_record, ParentRR_t _roun
   }
 }
 
-ParentRoundRobin::~ParentRoundRobin() { }
+ParentRoundRobin::~ParentRoundRobin()
+{
+}
 
 void
 ParentRoundRobin::selectParent(const ParentSelectionPolicy *policy, bool first_call, ParentResult *result, RequestData *rdata)
@@ -129,8 +131,7 @@ ParentRoundRobin::selectParent(const ParentSelectionPolicy *policy, bool first_c
   do {
     Debug("parent_select", "cur_index: %d, result->start_parent: %d", cur_index, result->start_parent);
     // DNS ParentOnly inhibits bypassing the parent so always return that t
-    if ((result->rec->parents[cur_index].failedAt == 0) ||
-        (result->rec->parents[cur_index].failCount < policy->FailThreshold)) {
+    if ((result->rec->parents[cur_index].failedAt == 0) || (result->rec->parents[cur_index].failCount < policy->FailThreshold)) {
       Debug("parent_select", "FailThreshold = %d", policy->FailThreshold);
       Debug("parent_select", "Selecting a parent due to little failCount (faileAt: %u failCount: %d)",
             (unsigned)result->rec->parents[cur_index].failedAt, result->rec->parents[cur_index].failCount);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d64434ea/proxy/ParentSelection.cc
----------------------------------------------------------------------
diff --git a/proxy/ParentSelection.cc b/proxy/ParentSelection.cc
index aa158e3..b71cb70 100644
--- a/proxy/ParentSelection.cc
+++ b/proxy/ParentSelection.cc
@@ -836,8 +836,8 @@ EXCLUSIVE_REGRESSION_TEST(PARENTSELECTION)(RegressionTest * /* t ATS_UNUSED */,
                             ALLOW_HOST_TABLE | ALLOW_REGEX_TABLE | ALLOW_URL_TABLE | ALLOW_IP_TABLE | DONT_BUILD_TABLE); \
   ParentTable->BuildTableFromString(tbl);                                                                                \
   params = new ParentConfigParams(ParentTable);                                                                          \
-  params->policy->FailThreshold = 1;                                                                                   \
-  params->policy->ParentEnable = true;                                                                                 \
+  params->policy->FailThreshold = 1;                                                                                     \
+  params->policy->ParentEnable = true;                                                                                   \
   params->policy->ParentRetryTime = 5;
   HttpRequestData *request = NULL;
   ParentResult *result = NULL;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d64434ea/proxy/ParentSelection.h
----------------------------------------------------------------------
diff --git a/proxy/ParentSelection.h b/proxy/ParentSelection.h
index c5b211d..f5508b8 100644
--- a/proxy/ParentSelection.h
+++ b/proxy/ParentSelection.h
@@ -89,8 +89,8 @@ class ParentRecord : public ControlBase
 {
 public:
   ParentRecord()
-    : parents(NULL), secondary_parents(NULL), num_parents(0), num_secondary_parents(0), ignore_query(false), 
-      rr_next(0), go_direct(true), selection_strategy(NULL)
+    : parents(NULL), secondary_parents(NULL), num_parents(0), num_secondary_parents(0), ignore_query(false), rr_next(0),
+      go_direct(true), selection_strategy(NULL)
   {
   }