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/07/23 09:16:56 UTC

trafficserver git commit: TS-3773 clang-format

Repository: trafficserver
Updated Branches:
  refs/heads/master d3a7f1b2f -> 2791665b1


TS-3773 clang-format


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

Branch: refs/heads/master
Commit: 2791665b106e2afb4693faeb31ab992babceb559
Parents: d3a7f1b
Author: Leif Hedstrom <zw...@apache.org>
Authored: Thu Jul 23 09:16:46 2015 +0200
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Thu Jul 23 09:16:46 2015 +0200

----------------------------------------------------------------------
 iocore/hostdb/HostDB.cc       | 26 +++++++++++++-------------
 proxy/http/HttpBodyFactory.cc |  3 ++-
 proxy/logging/Log.cc          | 11 ++++++-----
 proxy/logging/LogAccess.h     | 10 +++++-----
 4 files changed, 26 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2791665b/iocore/hostdb/HostDB.cc
----------------------------------------------------------------------
diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index 0c91ea3..bb438a1 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -2430,20 +2430,20 @@ struct ShowHostDB : public ShowCont {
   {
     if (event == EVENT_INTERVAL) {
       HostDBInfo *r = reinterpret_cast<HostDBInfo *>(e);
-      showOne(r,false,event,e);
+      showOne(r, false, event, e);
       if (r->round_robin) {
-              HostDBRoundRobin *rr_data = r->rr();
-              if (rr_data) {
-                CHECK_SHOW(show("<table border=1>\n"));
-                CHECK_SHOW(show("<tr><td>%s</td><td>%d</td></tr>\n", "Total", rr_data->rrcount));
-                CHECK_SHOW(show("<tr><td>%s</td><td>%d</td></tr>\n", "Good", rr_data->good));
-                CHECK_SHOW(show("<tr><td>%s</td><td>%d</td></tr>\n", "Current", rr_data->current));
-                CHECK_SHOW(show("</table>\n"));
-
-                for (int i = 0; i < rr_data->rrcount; i++)
-                  showOne(&rr_data->info[i], true, event, e);
-              }
-     }
+        HostDBRoundRobin *rr_data = r->rr();
+        if (rr_data) {
+          CHECK_SHOW(show("<table border=1>\n"));
+          CHECK_SHOW(show("<tr><td>%s</td><td>%d</td></tr>\n", "Total", rr_data->rrcount));
+          CHECK_SHOW(show("<tr><td>%s</td><td>%d</td></tr>\n", "Good", rr_data->good));
+          CHECK_SHOW(show("<tr><td>%s</td><td>%d</td></tr>\n", "Current", rr_data->current));
+          CHECK_SHOW(show("</table>\n"));
+
+          for (int i = 0; i < rr_data->rrcount; i++)
+            showOne(&rr_data->info[i], true, event, e);
+        }
+      }
     } else if (event == EVENT_DONE) {
       return complete(event, e);
     } else {

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2791665b/proxy/http/HttpBodyFactory.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpBodyFactory.cc b/proxy/http/HttpBodyFactory.cc
index 89960b2..362b335 100644
--- a/proxy/http/HttpBodyFactory.cc
+++ b/proxy/http/HttpBodyFactory.cc
@@ -449,7 +449,8 @@ HttpBodyFactory::fabricate(StrList *acpt_language_list, StrList *acpt_charset_li
 
 // LOCKING: must be called with lock taken
 const char *
-HttpBodyFactory::determine_set_by_host(HttpTransact::State *context) {
+HttpBodyFactory::determine_set_by_host(HttpTransact::State *context)
+{
   const char *set;
   RawHashTable_Value v;
   int host_len = context->hh_info.host_len;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2791665b/proxy/logging/Log.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/Log.cc b/proxy/logging/Log.cc
index 6f20b46..166f3b8 100644
--- a/proxy/logging/Log.cc
+++ b/proxy/logging/Log.cc
@@ -344,15 +344,16 @@ Log::init_fields()
     new LogField("client_host_ip_hex", "chih", LogField::IP, &LogAccess::marshal_client_host_ip, &LogAccess::unmarshal_ip_to_hex);
   global_field_list.add(field, false);
   ink_hash_table_insert(field_symbol_hash, "chih", field);
-  
-  // interface ip 
 
-  field = new LogField("host_interface_ip", "hii", LogField::IP, &LogAccess::marshal_host_interface_ip, &LogAccess::unmarshal_ip_to_str);
+  // interface ip
+
+  field =
+    new LogField("host_interface_ip", "hii", LogField::IP, &LogAccess::marshal_host_interface_ip, &LogAccess::unmarshal_ip_to_str);
   global_field_list.add(field, false);
   ink_hash_table_insert(field_symbol_hash, "hii", field);
 
-  field =
-    new LogField("host_interface_ip_hex", "hiih", LogField::IP, &LogAccess::marshal_host_interface_ip, &LogAccess::unmarshal_ip_to_hex);
+  field = new LogField("host_interface_ip_hex", "hiih", LogField::IP, &LogAccess::marshal_host_interface_ip,
+                       &LogAccess::unmarshal_ip_to_hex);
   global_field_list.add(field, false);
   ink_hash_table_insert(field_symbol_hash, "hiih", field);
   // interface ip end

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2791665b/proxy/logging/LogAccess.h
----------------------------------------------------------------------
diff --git a/proxy/logging/LogAccess.h b/proxy/logging/LogAccess.h
index 61f6679..f9c6e76 100644
--- a/proxy/logging/LogAccess.h
+++ b/proxy/logging/LogAccess.h
@@ -170,11 +170,11 @@ public:
   //
   // client -> proxy fields
   //
-  inkcoreapi virtual int marshal_client_host_ip(char *);                // STR
-  inkcoreapi virtual int marshal_host_interface_ip(char *);      // STR
-  inkcoreapi virtual int marshal_client_host_port(char *);              // INT
-  inkcoreapi virtual int marshal_client_auth_user_name(char *);         // STR
-  int marshal_client_req_timestamp_sec(char *);                         // INT
+  inkcoreapi virtual int marshal_client_host_ip(char *);        // STR
+  inkcoreapi virtual int marshal_host_interface_ip(char *);     // STR
+  inkcoreapi virtual int marshal_client_host_port(char *);      // INT
+  inkcoreapi virtual int marshal_client_auth_user_name(char *); // STR
+  int marshal_client_req_timestamp_sec(char *);                 // INT
 
   inkcoreapi virtual int marshal_client_req_text(char *);               // STR
   inkcoreapi virtual int marshal_client_req_http_method(char *);        // STR