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/01 02:21:30 UTC

trafficserver git commit: TS-3724 TS-3714 Fix clang-format (please remember to run it)

Repository: trafficserver
Updated Branches:
  refs/heads/master cc07927fc -> b68887233


TS-3724 TS-3714 Fix clang-format (please remember to run it)


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

Branch: refs/heads/master
Commit: b68887233cd96b81809b371854909760043765d5
Parents: cc07927
Author: Leif Hedstrom <zw...@apache.org>
Authored: Tue Jun 30 18:21:23 2015 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Tue Jun 30 18:21:23 2015 -0600

----------------------------------------------------------------------
 iocore/hostdb/I_HostDBProcessor.h   |  1 -
 iocore/hostdb/P_HostDBProcessor.h   | 10 +++++-----
 iocore/net/P_SSLNetVConnection.h    |  6 +++---
 iocore/net/SSLNetVConnection.cc     | 17 +++++++++--------
 iocore/net/UnixNetVConnection.cc    |  8 ++++----
 proxy/ProtocolProbeSessionAccept.cc | 13 +++++++------
 proxy/http/HttpSM.cc                |  2 +-
 7 files changed, 29 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b6888723/iocore/hostdb/I_HostDBProcessor.h
----------------------------------------------------------------------
diff --git a/iocore/hostdb/I_HostDBProcessor.h b/iocore/hostdb/I_HostDBProcessor.h
index 05112ff..43051bf 100644
--- a/iocore/hostdb/I_HostDBProcessor.h
+++ b/iocore/hostdb/I_HostDBProcessor.h
@@ -276,7 +276,6 @@ struct HostDBInfo {
       }
       return false;
     }
-
   }
   bool
   failed()

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b6888723/iocore/hostdb/P_HostDBProcessor.h
----------------------------------------------------------------------
diff --git a/iocore/hostdb/P_HostDBProcessor.h b/iocore/hostdb/P_HostDBProcessor.h
index d276112..6de6050 100644
--- a/iocore/hostdb/P_HostDBProcessor.h
+++ b/iocore/hostdb/P_HostDBProcessor.h
@@ -288,9 +288,9 @@ HostDBRoundRobin::select_best_http(sockaddr const *client_ip, ink_time_t now, in
   if (HostDBProcessor::hostdb_strict_round_robin) {
     Debug("hostdb", "Using strict round robin");
     // Check that the host we selected is alive
-    for (int i=0; i < good; i++){
+    for (int i = 0; i < good; i++) {
       best_any = current++ % good;
-      if (info[best_any].alive(now, fail_window)){
+      if (info[best_any].alive(now, fail_window)) {
         best_up = best_any;
         break;
       }
@@ -302,9 +302,9 @@ HostDBRoundRobin::select_best_http(sockaddr const *client_ip, ink_time_t now, in
       ++current;
       timed_rr_ctime = now;
     }
-    for (int i=0; i < good; i++){
+    for (int i = 0; i < good; i++) {
       best_any = current++ % good;
-      if (info[best_any].alive(now, fail_window)){
+      if (info[best_any].alive(now, fail_window)) {
         best_up = best_any;
         break;
       }
@@ -322,7 +322,7 @@ HostDBRoundRobin::select_best_http(sockaddr const *client_ip, ink_time_t now, in
         best_any = i;
         best_hash_any = h;
       }
-      if (info[i].alive(now, fail_window)){
+      if (info[i].alive(now, fail_window)) {
         if (best_hash_up <= h) {
           best_up = i;
           best_hash_up = h;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b6888723/iocore/net/P_SSLNetVConnection.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_SSLNetVConnection.h b/iocore/net/P_SSLNetVConnection.h
index 75a3a3d..e71d76e 100644
--- a/iocore/net/P_SSLNetVConnection.h
+++ b/iocore/net/P_SSLNetVConnection.h
@@ -219,19 +219,19 @@ public:
   // least some of the hooks
   bool calledHooks(TSHttpHookID /* eventId */) { return (this->sslHandshakeHookState != HANDSHAKE_HOOKS_PRE); }
 
-  MIOBuffer*
+  MIOBuffer *
   get_ssl_iobuf()
   {
     return iobuf;
   }
 
   void
-  set_ssl_iobuf(MIOBuffer* buf)
+  set_ssl_iobuf(MIOBuffer *buf)
   {
     iobuf = buf;
   }
 
-  IOBufferReader*
+  IOBufferReader *
   get_ssl_reader()
   {
     return reader;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b6888723/iocore/net/SSLNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index 41cd780..d7cb887 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -466,10 +466,11 @@ SSLNetVConnection::net_read_io(NetHandler *nh, EThread *lthread)
       readSignalError(nh, err);
     } else if (ret == SSL_HANDSHAKE_WANT_READ || ret == SSL_HANDSHAKE_WANT_ACCEPT || ret == EVENT_CONT) {
       if (SSLConfigParams::ssl_handshake_timeout_in > 0) {
-        double handshake_time = ((Thread::get_hrtime() - sslHandshakeBeginTime)/1000000000);
-        Debug ("ssl", "ssl handshake for vc %p, took %.3f seconds, configured handshake_timer: %d", this, handshake_time, SSLConfigParams::ssl_handshake_timeout_in);
+        double handshake_time = ((Thread::get_hrtime() - sslHandshakeBeginTime) / 1000000000);
+        Debug("ssl", "ssl handshake for vc %p, took %.3f seconds, configured handshake_timer: %d", this, handshake_time,
+              SSLConfigParams::ssl_handshake_timeout_in);
         if (handshake_time > SSLConfigParams::ssl_handshake_timeout_in) {
-          Debug ("ssl", "ssl handshake for vc %p, expired, release the connection", this);
+          Debug("ssl", "ssl handshake for vc %p, expired, release the connection", this);
           read.triggered = 0;
           nh->read_ready_list.remove(this);
           readSignalError(nh, VC_EVENT_EOS);
@@ -491,7 +492,7 @@ SSLNetVConnection::net_read_io(NetHandler *nh, EThread *lthread)
         if (!getSSLClientConnection()) {
           // we will not see another ET epoll event if the first byte is already
           // in the ssl buffers, so, SSL_read if there's anything already..
-          Debug ("ssl", "ssl handshake completed on vc %p, check to see if first byte, is already in the ssl buffers", this);
+          Debug("ssl", "ssl handshake completed on vc %p, check to see if first byte, is already in the ssl buffers", this);
           this->iobuf = new_MIOBuffer(BUFFER_SIZE_INDEX_4K);
           this->reader = this->iobuf->alloc_reader();
           s->vio.buffer.writer_for(this->iobuf);
@@ -500,9 +501,9 @@ SSLNetVConnection::net_read_io(NetHandler *nh, EThread *lthread)
             if (ret == SSL_READ_EOS) {
               this->eosRcvd = true;
             }
-            int pending = SSL_pending (this->ssl);
+            int pending = SSL_pending(this->ssl);
             if (r > 0 || pending > 0) {
-              Debug ("ssl", "ssl read right after handshake, read %" PRId64 ", pending %d bytes, for vc %p", r, pending, this);
+              Debug("ssl", "ssl read right after handshake, read %" PRId64 ", pending %d bytes, for vc %p", r, pending, this);
             }
           }
           read.triggered = 0;
@@ -787,8 +788,8 @@ SSLNetVConnection::SSLNetVConnection()
   : ssl(NULL), sslHandshakeBeginTime(0), sslLastWriteTime(0), sslTotalBytesSent(0), hookOpRequested(TS_SSL_HOOK_OP_DEFAULT),
     sslHandShakeComplete(false), sslClientConnection(false), sslClientRenegotiationAbort(false), handShakeBuffer(NULL),
     handShakeHolder(NULL), handShakeReader(NULL), handShakeBioStored(0), sslPreAcceptHookState(SSL_HOOKS_INIT),
-    sslHandshakeHookState(HANDSHAKE_HOOKS_PRE), npnSet(NULL), npnEndpoint(NULL), sessionAcceptPtr(NULL), iobuf(NULL),
-    reader(NULL), eosRcvd(false)
+    sslHandshakeHookState(HANDSHAKE_HOOKS_PRE), npnSet(NULL), npnEndpoint(NULL), sessionAcceptPtr(NULL), iobuf(NULL), reader(NULL),
+    eosRcvd(false)
 {
 }
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b6888723/iocore/net/UnixNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index 9533005..9087b19 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -1042,10 +1042,10 @@ UnixNetVConnection::acceptEvent(int event, Event *e)
   nh->open_list.enqueue(this);
 
 #ifdef USE_EDGE_TRIGGER
-    // Set the vc as triggered and place it in the read ready queue in case there is already data on the socket.
-    Debug("iocore_net", "acceptEvent : Setting triggered and adding to the read ready queue");
-    read.triggered = 1;
-    nh->read_ready_list.enqueue(this);
+  // Set the vc as triggered and place it in the read ready queue in case there is already data on the socket.
+  Debug("iocore_net", "acceptEvent : Setting triggered and adding to the read ready queue");
+  read.triggered = 1;
+  nh->read_ready_list.enqueue(this);
 #endif
 
   if (inactivity_timeout_in) {

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b6888723/proxy/ProtocolProbeSessionAccept.cc
----------------------------------------------------------------------
diff --git a/proxy/ProtocolProbeSessionAccept.cc b/proxy/ProtocolProbeSessionAccept.cc
index 770119b..5b8a7a8 100644
--- a/proxy/ProtocolProbeSessionAccept.cc
+++ b/proxy/ProtocolProbeSessionAccept.cc
@@ -59,7 +59,8 @@ struct ProtocolProbeTrampoline : public Continuation, public ProtocolProbeSessio
   static const unsigned buffer_size_index = CLIENT_CONNECTION_FIRST_READ_BUFFER_SIZE_INDEX;
   IOBufferReader *reader;
 
-  explicit ProtocolProbeTrampoline(const ProtocolProbeSessionAccept *probe, ProxyMutex *mutex, MIOBuffer *buffer, IOBufferReader *reader)
+  explicit ProtocolProbeTrampoline(const ProtocolProbeSessionAccept *probe, ProxyMutex *mutex, MIOBuffer *buffer,
+                                   IOBufferReader *reader)
     : Continuation(mutex), probeParent(probe)
   {
     this->iobuf = buffer ? buffer : new_MIOBuffer(buffer_size_index);
@@ -146,24 +147,24 @@ ProtocolProbeSessionAccept::mainEvent(int event, void *data)
     VIO *vio;
     NetVConnection *netvc = static_cast<NetVConnection *>(data);
     SSLNetVConnection *ssl_vc = dynamic_cast<SSLNetVConnection *>(netvc);
-    MIOBuffer* buf = NULL;
+    MIOBuffer *buf = NULL;
     IOBufferReader *reader = NULL;
     if (ssl_vc) {
       buf = ssl_vc->get_ssl_iobuf();
       reader = ssl_vc->get_ssl_reader();
     }
-    ProtocolProbeTrampoline * probe = new ProtocolProbeTrampoline(this, netvc->mutex, buf, reader);
+    ProtocolProbeTrampoline *probe = new ProtocolProbeTrampoline(this, netvc->mutex, buf, reader);
 
     // XXX we need to apply accept inactivity timeout here ...
 
     if (!probe->reader->is_read_avail_more_than(0)) {
-      Debug ("http", "probe needs data, read..");
+      Debug("http", "probe needs data, read..");
       vio = netvc->do_io_read(probe, BUFFER_SIZE_FOR_INDEX(ProtocolProbeTrampoline::buffer_size_index), probe->iobuf);
       vio->reenable();
     } else {
-      Debug ("http", "probe already has data, call ioComplete directly..");
+      Debug("http", "probe already has data, call ioComplete directly..");
       vio = netvc->do_io_read(NULL, 0, NULL);
-      probe->ioCompletionEvent(VC_EVENT_READ_COMPLETE, (void*)vio);
+      probe->ioCompletionEvent(VC_EVENT_READ_COMPLETE, (void *)vio);
     }
     return EVENT_CONT;
   }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b6888723/proxy/http/HttpSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 37b73d5..082be26 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -571,7 +571,7 @@ HttpSM::state_read_client_request_header(int event, void *data)
   // check to see if there was an EOS received on the SSL connection
   SSLNetVConnection *ssl_vc = dynamic_cast<SSLNetVConnection *>(ua_session->get_netvc());
   if (ssl_vc && ssl_vc->isEosRcvd()) {
-    DebugSM ("http", "EOS for ssl vc %p at read_first_btye state", ua_session->get_netvc());
+    DebugSM("http", "EOS for ssl vc %p at read_first_btye state", ua_session->get_netvc());
     event = VC_EVENT_EOS;
   }
   switch (event) {