Repository: trafficserver
Updated Branches:
  refs/heads/master 4a86672f9 -> 5dca12438


minor "grammar" fix per James Peach's suggestion


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

Branch: refs/heads/master
Commit: 5dca124383624085f20cc5944c4dce83ef8093f6
Parents: 4a86672
Author: Sudheer Vinukonda <[email protected]>
Authored: Fri Oct 17 16:50:56 2014 +0000
Committer: Sudheer Vinukonda <[email protected]>
Committed: Fri Oct 17 16:50:56 2014 +0000

----------------------------------------------------------------------
 iocore/net/P_SSLNetVConnection.h  |  2 +-
 iocore/net/P_UnixNetVConnection.h |  2 +-
 iocore/net/SSLNetVConnection.cc   | 20 ++++++++++----------
 iocore/net/UnixNetVConnection.cc  | 22 +++++++++++-----------
 4 files changed, 23 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5dca1243/iocore/net/P_SSLNetVConnection.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_SSLNetVConnection.h b/iocore/net/P_SSLNetVConnection.h
index 4a6d7c8..a7cfcbf 100644
--- a/iocore/net/P_SSLNetVConnection.h
+++ b/iocore/net/P_SSLNetVConnection.h
@@ -103,7 +103,7 @@ public:
   int sslServerHandShakeEvent(int &err);
   int sslClientHandShakeEvent(int &err);
   virtual void net_read_io(NetHandler * nh, EThread * lthread);
-  virtual int64_t load_buffer_and_write(int64_t towrite, int64_t &wattempted, 
int64_t &total_wrote, MIOBufferAccessor & buf, int &needs);
+  virtual int64_t load_buffer_and_write(int64_t towrite, int64_t &wattempted, 
int64_t &total_written, MIOBufferAccessor & buf, int &needs);
   void registerNextProtocolSet(const SSLNextProtocolSet *);
 
   ////////////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5dca1243/iocore/net/P_UnixNetVConnection.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_UnixNetVConnection.h 
b/iocore/net/P_UnixNetVConnection.h
index 4690556..d1cac6a 100644
--- a/iocore/net/P_UnixNetVConnection.h
+++ b/iocore/net/P_UnixNetVConnection.h
@@ -184,7 +184,7 @@ public:
     (void) state;
   }
   virtual void net_read_io(NetHandler *nh, EThread *lthread);
-  virtual int64_t load_buffer_and_write(int64_t towrite, int64_t &wattempted, 
int64_t &total_wrote, MIOBufferAccessor & buf, int &needs);
+  virtual int64_t load_buffer_and_write(int64_t towrite, int64_t &wattempted, 
int64_t &total_written, MIOBufferAccessor & buf, int &needs);
   void readDisable(NetHandler *nh);
   void readSignalError(NetHandler *nh, int err);
   int readSignalDone(int event, NetHandler *nh);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5dca1243/iocore/net/SSLNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index d4e5f0d..c37a63d 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -612,7 +612,7 @@ SSLNetVConnection::net_read_io(NetHandler *nh, EThread 
*lthread)
 
 
 int64_t
-SSLNetVConnection::load_buffer_and_write(int64_t towrite, int64_t &wattempted, 
int64_t &total_wrote, MIOBufferAccessor & buf, int &needs)
+SSLNetVConnection::load_buffer_and_write(int64_t towrite, int64_t &wattempted, 
int64_t &total_written, MIOBufferAccessor & buf, int &needs)
 {
   ProxyMutex *mutex = this_ethread()->mutex;
   int64_t r = 0;
@@ -638,7 +638,7 @@ SSLNetVConnection::load_buffer_and_write(int64_t towrite, 
int64_t &wattempted, i
   }
 
   if (HttpProxyPort::TRANSPORT_BLIND_TUNNEL == this->attributes) {
-    return this->super::load_buffer_and_write(towrite, wattempted, 
total_wrote, buf, needs);
+    return this->super::load_buffer_and_write(towrite, wattempted, 
total_written, buf, needs);
   }
 
   do {
@@ -651,7 +651,7 @@ SSLNetVConnection::load_buffer_and_write(int64_t towrite, 
int64_t &wattempted, i
       continue;
     }
     // check if to amount to write exceeds that in this buffer
-    int64_t wavail = towrite - total_wrote;
+    int64_t wavail = towrite - total_written;
 
     if (l > wavail) {
       l = wavail;
@@ -681,13 +681,13 @@ SSLNetVConnection::load_buffer_and_write(int64_t towrite, 
int64_t &wattempted, i
     }
 
     wattempted = l;
-    total_wrote += l;
+    total_written += l;
     Debug("ssl", "SSLNetVConnection::loadBufferAndCallWrite, before 
SSLWriteBuffer, l=%" PRId64", towrite=%" PRId64", b=%p",
           l, towrite, b);
     err = SSLWriteBuffer(ssl, b->start() + offset, l, r);
 
     if (r == l) {
-      wattempted = total_wrote;
+      wattempted = total_written;
     }
     if (l == orig_l) {
         // on to the next block
@@ -697,21 +697,21 @@ SSLNetVConnection::load_buffer_and_write(int64_t towrite, 
int64_t &wattempted, i
         offset += l;
     }
 
-    Debug("ssl", "SSLNetVConnection::loadBufferAndCallWrite,Number of bytes 
written=%" PRId64" , total=%" PRId64"", r, total_wrote);
+    Debug("ssl", "SSLNetVConnection::loadBufferAndCallWrite,Number of bytes 
written=%" PRId64" , total=%" PRId64"", r, total_written);
     NET_DEBUG_COUNT_DYN_STAT(net_calls_to_write_stat, 1);
-  } while (r == l && total_wrote < towrite && b);
+  } while (r == l && total_written < towrite && b);
 
   if (r > 0) {
     sslLastWriteTime = now;
-    sslTotalBytesSent += total_wrote;
-    if (total_wrote != wattempted) {
+    sslTotalBytesSent += total_written;
+    if (total_written != wattempted) {
       Debug("ssl", "SSLNetVConnection::loadBufferAndCallWrite, wrote some 
bytes, but not all requested.");
       // I'm not sure how this could happen. We should have tried and hit an 
EAGAIN.
       needs |= EVENTIO_WRITE;
       return (r);
     } else {
       Debug("ssl", "SSLNetVConnection::loadBufferAndCallWrite, write 
successful.");
-      return (total_wrote);
+      return (total_written);
     }
   } else {
     switch (err) {

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5dca1243/iocore/net/UnixNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index 35db956..c122fbe 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -440,16 +440,16 @@ write_to_net_io(NetHandler *nh, UnixNetVConnection *vc, 
EThread *thread)
     return;
   }
 
-  int64_t total_wrote = 0, wattempted = 0;
+  int64_t total_written = 0, wattempted = 0;
   int needs = 0;
-  int64_t r = vc->load_buffer_and_write(towrite, wattempted, total_wrote, buf, 
needs);
+  int64_t r = vc->load_buffer_and_write(towrite, wattempted, total_written, 
buf, needs);
 
   // if we have already moved some bytes successfully, summarize in r
-  if (total_wrote != wattempted) {
+  if (total_written != wattempted) {
     if (r <= 0)
-      r = total_wrote - wattempted;
+      r = total_written - wattempted;
     else
-      r = total_wrote - wattempted + r;
+      r = total_written - wattempted + r;
   }
   // check for errors
   if (r <= 0) {                 // if the socket was not ready,add to WaitList
@@ -851,7 +851,7 @@ UnixNetVConnection::net_read_io(NetHandler *nh, EThread 
*lthread)
 // (SSL read does not support overlapped i/o)
 // without duplicating all the code in write_to_net.
 int64_t
-UnixNetVConnection::load_buffer_and_write(int64_t towrite, int64_t 
&wattempted, int64_t &total_wrote, MIOBufferAccessor & buf, int &needs)
+UnixNetVConnection::load_buffer_and_write(int64_t towrite, int64_t 
&wattempted, int64_t &total_written, MIOBufferAccessor & buf, int &needs)
 {
   int64_t r = 0;
 
@@ -862,7 +862,7 @@ UnixNetVConnection::load_buffer_and_write(int64_t towrite, 
int64_t &wattempted,
   do {
     IOVec tiovec[NET_MAX_IOV];
     int niov = 0;
-    int64_t total_wrote_last = total_wrote;
+    int64_t total_written_last = total_written;
     while (b && niov < NET_MAX_IOV) {
       // check if we have done this block
       int64_t l = b->read_avail();
@@ -873,12 +873,12 @@ UnixNetVConnection::load_buffer_and_write(int64_t 
towrite, int64_t &wattempted,
         continue;
       }
       // check if to amount to write exceeds that in this buffer
-      int64_t wavail = towrite - total_wrote;
+      int64_t wavail = towrite - total_written;
       if (l > wavail)
         l = wavail;
       if (!l)
         break;
-      total_wrote += l;
+      total_written += l;
       // build an iov entry
       tiovec[niov].iov_len = l;
       tiovec[niov].iov_base = b->start() + offset;
@@ -887,14 +887,14 @@ UnixNetVConnection::load_buffer_and_write(int64_t 
towrite, int64_t &wattempted,
       offset = 0;
       b = b->next;
     }
-    wattempted = total_wrote - total_wrote_last;
+    wattempted = total_written - total_written_last;
     if (niov == 1)
       r = socketManager.write(con.fd, tiovec[0].iov_base, tiovec[0].iov_len);
     else
       r = socketManager.writev(con.fd, &tiovec[0], niov);
     ProxyMutex *mutex = thread->mutex;
     NET_DEBUG_COUNT_DYN_STAT(net_calls_to_write_stat, 1);
-  } while (r == wattempted && total_wrote < towrite);
+  } while (r == wattempted && total_written < towrite);
 
   needs |= EVENTIO_WRITE;
 

Reply via email to