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 2016/09/15 22:10:02 UTC

[trafficserver] branch master updated: Define NET_MAX_IOV in a single place.

This is an automated email from the ASF dual-hosted git repository.

jpeach pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
       new  65a285d   Define NET_MAX_IOV in a single place.
65a285d is described below

commit 65a285d4d5651f507314a8b0f7d18bfbb5a6cbbf
Author: James Peach <jp...@apache.org>
AuthorDate: Thu Sep 15 15:09:47 2016 -0700

    Define NET_MAX_IOV in a single place.
---
 iocore/net/I_Net.h               |  6 ++++++
 iocore/net/SSLNetVConnection.cc  |  6 ------
 iocore/net/UnixNetVConnection.cc | 13 ++++---------
 3 files changed, 10 insertions(+), 15 deletions(-)

diff --git a/iocore/net/I_Net.h b/iocore/net/I_Net.h
index 06d2d93..152a80b 100644
--- a/iocore/net/I_Net.h
+++ b/iocore/net/I_Net.h
@@ -45,6 +45,12 @@
 #include "I_EventSystem.h"
 #include <netinet/in.h>
 
+#ifndef UIO_MAXIOV
+#define NET_MAX_IOV 16 // UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1)
+#else
+#define NET_MAX_IOV UIO_MAXIOV
+#endif
+
 #define NET_SYSTEM_MODULE_MAJOR_VERSION 1
 #define NET_SYSTEM_MODULE_MINOR_VERSION 0
 #define NET_SYSTEM_MODULE_VERSION \
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index 2e96eb3..46d53ac 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -57,12 +57,6 @@ void SSL_set_rbio(SSL *ssl, BIO *rbio);
 #define SSL_WRITE_WOULD_BLOCK 10
 #define SSL_WAIT_FOR_HOOK 11
 
-#ifndef UIO_MAXIOV
-#define NET_MAX_IOV 16 // UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1)
-#else
-#define NET_MAX_IOV UIO_MAXIOV
-#endif
-
 ClassAllocator<SSLNetVConnection> sslNetVCAllocator("sslNetVCAllocator");
 
 namespace
diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index bd07ae6..8058f3e 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -29,12 +29,6 @@
 #define STATE_VIO_OFFSET ((uintptr_t) & ((NetState *)0)->vio)
 #define STATE_FROM_VIO(_x) ((NetState *)(((char *)(_x)) - STATE_VIO_OFFSET))
 
-#ifndef UIO_MAXIOV
-#define NET_MAX_IOV 16 // UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1)
-#else
-#define NET_MAX_IOV UIO_MAXIOV
-#endif
-
 // Global
 ClassAllocator<UnixNetVConnection> netVCAllocator("netVCAllocator");
 
@@ -112,12 +106,13 @@ close_UnixNetVConnection(UnixNetVConnection *vc, EThread *t)
     vc->active_timeout = NULL;
   }
 #else
-  vc->next_inactivity_timeout_at   = 0;
-  vc->next_activity_timeout_at     = 0;
+  vc->next_inactivity_timeout_at = 0;
+  vc->next_activity_timeout_at   = 0;
 #endif
+
   vc->inactivity_timeout_in = 0;
+  vc->active_timeout_in     = 0;
 
-  vc->active_timeout_in = 0;
   if (nh) {
     nh->open_list.remove(vc);
     nh->cop_list.remove(vc);

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].