You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2016/01/12 18:25:52 UTC

[1/2] trafficserver git commit: TS-3841: LogAccess.cc assert failed when enabling custom log and stats_over_http plugin

Repository: trafficserver
Updated Branches:
  refs/heads/6.1.x f4b33e684 -> 41964ab76


TS-3841: LogAccess.cc assert failed when enabling custom log and stats_over_http plugin

(cherry picked from commit 9399a76410de027092b20e0a287f315fca20257d)


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

Branch: refs/heads/6.1.x
Commit: c35ea7ff08ce9402b7e3c9bb5c522d6e5ed2ec4c
Parents: f4b33e6
Author: Bryan Call <bc...@apache.org>
Authored: Mon Jan 11 17:35:50 2016 -0800
Committer: Bryan Call <bc...@apache.org>
Committed: Tue Jan 12 09:23:41 2016 -0800

----------------------------------------------------------------------
 proxy/logging/LogAccessHttp.cc | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c35ea7ff/proxy/logging/LogAccessHttp.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogAccessHttp.cc b/proxy/logging/LogAccessHttp.cc
index 68e3bff..3d12ebf 100644
--- a/proxy/logging/LogAccessHttp.cc
+++ b/proxy/logging/LogAccessHttp.cc
@@ -506,16 +506,29 @@ LogAccessHttp::marshal_client_req_unmapped_url_path(char *buf)
 int
 LogAccessHttp::marshal_client_req_unmapped_url_host(char *buf)
 {
-  int len = INK_MIN_ALIGN;
+  int plen = INK_MIN_ALIGN;
 
   validate_unmapped_url();
   validate_unmapped_url_path();
 
-  len = round_strlen(m_client_req_unmapped_url_host_len + 1); // +1 for eos
+  int alen = m_client_req_unmapped_url_host_len;
+  if (alen < 0) {
+    alen = 0;
+  }
+
+  // calculate the the padded length only if the actual length
+  // is not zero. We don't want the padded length to be zero
+  // because marshal_mem should write the DEFAULT_STR to the
+  // buffer if str is nil, and we need room for this.
+  if (alen) {
+    plen = round_strlen(alen + 1); // +1 for eos
+  }
+
   if (buf) {
-    marshal_mem(buf, m_client_req_unmapped_url_host_str, m_client_req_unmapped_url_host_len, len);
+    marshal_mem(buf, m_client_req_unmapped_url_host_str, alen, plen);
   }
-  return len;
+
+  return plen;
 }
 
 int


[2/2] trafficserver git commit: TS-4125: wrong non-active conditions check

Posted by bc...@apache.org.
TS-4125: wrong non-active conditions check

This closes #416

(cherry picked from commit c26952d95104067d45704d6c81eb3bc038fd2282)


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

Branch: refs/heads/6.1.x
Commit: 41964ab7662741d71de46286b7db8fb9a557a60f
Parents: c35ea7f
Author: Oknet <xu...@gmail.com>
Authored: Tue Jan 12 09:22:26 2016 -0800
Committer: Bryan Call <bc...@apache.org>
Committed: Tue Jan 12 09:23:52 2016 -0800

----------------------------------------------------------------------
 iocore/net/UnixNet.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/41964ab7/iocore/net/UnixNet.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNet.cc b/iocore/net/UnixNet.cc
index b3a7587..7e0948c 100644
--- a/iocore/net/UnixNet.cc
+++ b/iocore/net/UnixNet.cc
@@ -586,7 +586,7 @@ NetHandler::manage_active_queue()
   int total_idle_time = 0;
   int total_idle_count = 0;
   for (; vc != NULL; vc = vc_next) {
-    if ((vc->next_inactivity_timeout_at > now) || (vc->next_activity_timeout_at > now)) {
+    if ((vc->next_inactivity_timeout_at <= now) || (vc->next_activity_timeout_at <= now)) {
       _close_vc(vc, now, handle_event, closed, total_idle_time, total_idle_count);
     }
     if (max_connections_active_per_thread_in > active_queue_size) {