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 2018/07/31 20:43:48 UTC

[trafficserver] branch 8.0.x updated (ca70d48 -> 3af405e)

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

zwoop pushed a change to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


    from ca70d48  Remove INKContInternal warning.
     new cf42cca  Doc: Fix build errors in logging. These are artifacts of the YAML update and the shn changes.
     new de47983  Enhances detection of luajit
     new 813e9c5   Removes compiler flag overrides related to obsolete intree LuaJIT build
     new f84abcf  Cleans up brotli compiler and linker flags
     new ed41c18  Cleans up LDADDs in traffic_server
     new 7f7ced4  Remove Http2ConnectionState::continued_buffer
     new 0815a85  Fixes some var-args missing va_start/end
     new 00de445  Fixing copy paste error in SNI yaml parsing
     new d02fd2b  Removes more references to traffic_cop and cop related functionality
     new dad12a8  Fixes spelling
     new 3af405e  Removes old commented-out code

The 11 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CMakeLists.txt                                     |   1 -
 build/brotli.m4                                    |  18 +--
 build/luajit.m4                                    | 176 +++++++++++++++++++++
 configure.ac                                       |  58 +------
 doc/.tx/config                                     |   5 -
 doc/admin-guide/files/logging.yaml.en.rst          |  62 ++++----
 doc/admin-guide/logging/examples.en.rst            |   3 +-
 .../monitoring/statistics/core/general.en.rst      |   3 -
 doc/admin-guide/plugins/lua.en.rst                 |   6 +-
 iocore/net/YamlSNIConfig.cc                        |   2 +-
 lib/records/Makefile.am                            |   7 +-
 lib/records/P_RecMessage.h                         |   1 -
 lib/records/RecLocal.cc                            |   9 --
 lib/records/RecProcess.cc                          |  19 ---
 lib/ts/ink_sock.cc                                 |   1 -
 lib/ts/ink_sprintf.cc                              |   1 +
 mgmt/Cop.h                                         |  27 ----
 mgmt/api/include/mgmtapi.h                         |   2 +-
 plugins/compress/Makefile.inc                      |   4 +-
 plugins/lua/Makefile.inc                           |   2 +-
 proxy/hdrs/MIME.h                                  |   4 +-
 proxy/http/HttpBodyFactory.cc                      |   1 -
 proxy/http/HttpBodyFactory.h                       |  10 +-
 proxy/http/HttpSM.cc                               |   4 -
 proxy/http/HttpTransact.h                          |  11 --
 proxy/http2/Http2ConnectionState.h                 |  10 +-
 src/traffic_ctl/config.cc                          |   5 -
 src/traffic_manager/traffic_manager.cc             |   1 -
 src/traffic_server/CoreUtils.cc                    |   4 -
 src/traffic_server/HostStatus.cc                   |   2 +-
 src/traffic_server/Makefile.inc                    |  11 +-
 src/traffic_server/SocksProxy.cc                   |   5 -
 src/traffic_server/traffic_server.cc               |  15 +-
 src/traffic_top/traffic_top.cc                     |   2 -
 34 files changed, 248 insertions(+), 244 deletions(-)
 create mode 100644 build/luajit.m4
 delete mode 100644 mgmt/Cop.h


[trafficserver] 11/11: Removes old commented-out code

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 3af405e6867c7900f86965614d95f8997fc7ec8f
Author: Randall Meyer <ra...@yahoo.com>
AuthorDate: Mon Jun 4 10:09:41 2018 -0700

    Removes old commented-out code
    
    (cherry picked from commit 65cb22615c5abe8bcf816b94239d804375ede797)
---
 lib/records/P_RecMessage.h           |  1 -
 lib/records/RecLocal.cc              |  9 ---------
 lib/records/RecProcess.cc            | 19 -------------------
 lib/ts/ink_sock.cc                   |  1 -
 proxy/hdrs/MIME.h                    |  4 +---
 proxy/http/HttpBodyFactory.cc        |  1 -
 proxy/http/HttpSM.cc                 |  4 ----
 proxy/http/HttpTransact.h            | 11 -----------
 src/traffic_server/CoreUtils.cc      |  4 ----
 src/traffic_server/SocksProxy.cc     |  5 -----
 src/traffic_server/traffic_server.cc | 15 ++-------------
 src/traffic_top/traffic_top.cc       |  2 --
 12 files changed, 3 insertions(+), 73 deletions(-)

diff --git a/lib/records/P_RecMessage.h b/lib/records/P_RecMessage.h
index c653017..24db24c 100644
--- a/lib/records/P_RecMessage.h
+++ b/lib/records/P_RecMessage.h
@@ -29,7 +29,6 @@
 // Initialization
 //-------------------------------------------------------------------------
 
-// int RecMessageInit();
 void RecMessageRegister();
 
 //-------------------------------------------------------------------------
diff --git a/lib/records/RecLocal.cc b/lib/records/RecLocal.cc
index 3c2a4f1..c27a13a 100644
--- a/lib/records/RecLocal.cc
+++ b/lib/records/RecLocal.cc
@@ -168,15 +168,6 @@ RecLocalInit(Diags *_diags)
     return REC_ERR_FAIL;
   }
 
-  /* -- defer RecMessageInit() until LocalManager is initialized
-     if (RecMessageInit(RECM_SERVER) == REC_ERR_FAIL) {
-     return REC_ERR_FAIL;
-     }
-
-     if (RecMessageRegisterRecvCb(recv_message_cb, nullptr)) {
-     return REC_ERR_FAIL;
-     }
-   */
   initialized_p = true;
 
   return REC_ERR_OKAY;
diff --git a/lib/records/RecProcess.cc b/lib/records/RecProcess.cc
index 272d887..5859380 100644
--- a/lib/records/RecProcess.cc
+++ b/lib/records/RecProcess.cc
@@ -222,25 +222,6 @@ RecProcessInit(RecModeT mode_type, Diags *_diags)
     return REC_ERR_FAIL;
   }
 
-  /* -- defer RecMessageInit() until ProcessManager is initialized and
-   *    started
-   if (RecMessageInit(mode_type) == REC_ERR_FAIL) {
-   return REC_ERR_FAIL;
-   }
-
-   if (RecMessageRegisterRecvCb(recv_message_cb__process, nullptr)) {
-   return REC_ERR_FAIL;
-   }
-
-   ink_cond_init(&g_force_req_cond);
-   ink_mutex_init(&g_force_req_mutex);
-   if (mode_type == RECM_CLIENT) {
-   send_pull_message(RECG_PULL_REQ);
-   ink_cond_wait(&g_force_req_cond, &g_force_req_mutex);
-   ink_mutex_release(&g_force_req_mutex);
-   }
-   */
-
   initialized_p = true;
 
   return REC_ERR_OKAY;
diff --git a/lib/ts/ink_sock.cc b/lib/ts/ink_sock.cc
index 167e0ee..e3848e0 100644
--- a/lib/ts/ink_sock.cc
+++ b/lib/ts/ink_sock.cc
@@ -233,7 +233,6 @@ fd_read_line(int fd, char *s, int len)
 {
   char c;
   int numread = 0, r;
-  // char *buf = s;
   do {
     do {
       r = read(fd, &c, 1);
diff --git a/proxy/hdrs/MIME.h b/proxy/hdrs/MIME.h
index 7ebc3bb..fbdf4c8 100644
--- a/proxy/hdrs/MIME.h
+++ b/proxy/hdrs/MIME.h
@@ -278,11 +278,9 @@ struct MIMEHdrImpl : public HdrHeapObjImpl {
  ***********************************************************************/
 
 struct MIMEScanner {
-  char *m_line; // buffered line being built up
-  // int m_type;               // what kind of scanner: raw line, or field (this has never been used)
+  char *m_line;           // buffered line being built up
   int m_line_length;      // size of real live data in buffer
   int m_line_size;        // total allocated size of buffer
-                          //  int m_state;                  // state of scanning state machine
   MimeParseState m_state; ///< Parsing machine state.
 };
 
diff --git a/proxy/http/HttpBodyFactory.cc b/proxy/http/HttpBodyFactory.cc
index 97d093d..5b73337 100644
--- a/proxy/http/HttpBodyFactory.cc
+++ b/proxy/http/HttpBodyFactory.cc
@@ -260,7 +260,6 @@ config_callback(const char * /* name ATS_UNUSED */, RecDataT /* data_type ATS_UN
 
 void
 HttpBodyFactory::reconfigure()
-//#endif
 {
   RecInt e;
   bool all_found;
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 308fb46..b3f645f 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -965,10 +965,6 @@ HttpSM::state_read_push_response_header(int event, void *data)
   int64_t data_size  = 0;
   int64_t bytes_used = 0;
 
-  // Not used here.
-  // bool parse_error = false;
-  // VIO* vio = (VIO*) data;
-
   switch (event) {
   case VC_EVENT_EOS:
     ua_entry->eos = true;
diff --git a/proxy/http/HttpTransact.h b/proxy/http/HttpTransact.h
index 3ad3211..f9ccd38 100644
--- a/proxy/http/HttpTransact.h
+++ b/proxy/http/HttpTransact.h
@@ -41,8 +41,6 @@
 #include "records/I_RecHttp.h"
 #include "ProxyClientSession.h"
 
-#define MAX_DNS_LOOKUPS 2
-
 #define HTTP_RELEASE_ASSERT(X) ink_release_assert(X)
 
 #define ACQUIRE_PRINT_LOCK() // ink_mutex_acquire(&print_lock);
@@ -456,11 +454,6 @@ public:
     VARIABILITY_ALL,
   };
 
-  struct StatRecord_t {
-    uint16_t index;
-    int64_t increment;
-  };
-
   enum CacheLookupResult_t {
     CACHE_LOOKUP_NONE,
     CACHE_LOOKUP_MISS,
@@ -684,8 +677,6 @@ public:
     _SquidLogInfo() {}
   } SquidLogInfo;
 
-#define HTTP_TRANSACT_STATE_MAX_XBUF_SIZE (1024 * 2) /* max size of plugin exchange buffer */
-
   struct State {
     HttpTransactMagic_t m_magic = HTTP_TRANSACT_MAGIC_ALIVE;
 
@@ -705,7 +696,6 @@ public:
     ConnectionAttributes client_info;
     ConnectionAttributes parent_info;
     ConnectionAttributes server_info;
-    // ConnectionAttributes     router_info;
 
     Source_t source                = SOURCE_NONE;
     Source_t pre_transform_source  = SOURCE_NONE;
@@ -731,7 +721,6 @@ public:
     ParentResult parent_result;
     CacheControlResult cache_control;
     CacheLookupResult_t cache_lookup_result = CACHE_LOOKUP_NONE;
-    // FilterResult             content_control;
 
     StateMachineAction_t next_action                      = SM_ACTION_UNDEFINED; // out
     StateMachineAction_t api_next_action                  = SM_ACTION_UNDEFINED; // out
diff --git a/src/traffic_server/CoreUtils.cc b/src/traffic_server/CoreUtils.cc
index 0d9853f..bdcb853 100644
--- a/src/traffic_server/CoreUtils.cc
+++ b/src/traffic_server/CoreUtils.cc
@@ -896,22 +896,18 @@ process_core(char *fname)
                 }
                 printf("\n");
 
-                // if (is_debug_tag_set("note")) {
                 printf("\n**** NT_PRSTATUS ****\n");
 
                 printf("Process id = %d\n", pstat.pr_pid);
                 printf("Parent Process id = %d\n", pstat.pr_ppid);
 
                 printf("Signal that caused this core dump is signal  = %d\n", pstat.pr_cursig);
-                // convert it using strsignal
-                // char *msg=strsignal(pstat.pr_cursig);
 
                 printf("stack pointer = %#x\n", (unsigned int)pstat.pr_reg[SP_REGNUM]); // UESP
                 framep = pstat.pr_reg[FP_REGNUM];
                 pc     = pstat.pr_reg[PC_REGNUM];
                 printf("frame pointer = %#x\n", (unsigned int)pstat.pr_reg[FP_REGNUM]); // EBP
                 printf("program counter if no save = %#x\n", (unsigned int)pstat.pr_reg[PC_REGNUM]);
-                //}
                 break;
 
               case NT_PRPSINFO:
diff --git a/src/traffic_server/SocksProxy.cc b/src/traffic_server/SocksProxy.cc
index bee32c2..1db846b 100644
--- a/src/traffic_server/SocksProxy.cc
+++ b/src/traffic_server/SocksProxy.cc
@@ -58,10 +58,8 @@ struct SocksProxy : public Continuation {
 
   ~SocksProxy() override {}
 
-  // int startEvent(int event, void * data);
   int mainEvent(int event, void *data);
   int setupHttpRequest(unsigned char *p);
-  // int setupServerTunnel(unsigned char * p);
 
   int sendResp(bool granted);
 
@@ -120,7 +118,6 @@ SocksProxy::mainEvent(int event, void *data)
 
   VIO *vio;
   int64_t n_read_avail;
-  // int n_consume;
 
   recursion++;
 
@@ -198,7 +195,6 @@ SocksProxy::mainEvent(int event, void *data)
             port_ptr                  = &p[2];
             clientVC->socks_addr.type = SOCKS_ATYPE_IPV4;
             reader->consume(i + 1);
-            // n_consume = i+1;
             ret = EVENT_DONE;
           }
         }
@@ -522,7 +518,6 @@ int
 socks5ServerAuthHandler(int event, unsigned char *p, void (**h_ptr)(void))
 {
   int ret = 0;
-  // bool no_auth_needed=true;
 
   switch (event) {
   case SOCKS_AUTH_READ_COMPLETE:
diff --git a/src/traffic_server/traffic_server.cc b/src/traffic_server/traffic_server.cc
index 164c19d..0e78668 100644
--- a/src/traffic_server/traffic_server.cc
+++ b/src/traffic_server/traffic_server.cc
@@ -791,9 +791,8 @@ cmd_clear(char *cmd)
 {
   Note("CLEAR");
 
-  bool c_all = !strcmp(cmd, "clear");
-  bool c_hdb = !strcmp(cmd, "clear_hostdb");
-  // bool c_adb = !strcmp(cmd, "clear_authdb");
+  bool c_all   = !strcmp(cmd, "clear");
+  bool c_hdb   = !strcmp(cmd, "clear_hostdb");
   bool c_cache = !strcmp(cmd, "clear_cache");
 
   if (c_all || c_hdb) {
@@ -818,16 +817,6 @@ cmd_clear(char *cmd)
     }
   }
 
-  //#ifndef INK_NO_ACC
-  //  if (c_adb || c_all) {
-  //   if (!acc.clear_cache()) {
-  //    return CMD_FAILED;
-  //  }
-  // if (c_adb)
-  //  return CMD_OK;
-  //  }
-  //#endif
-
   if (c_all || c_cache) {
     Note("Clearing Cache");
 
diff --git a/src/traffic_top/traffic_top.cc b/src/traffic_top/traffic_top.cc
index 47667ba..da44ae8 100644
--- a/src/traffic_top/traffic_top.cc
+++ b/src/traffic_top/traffic_top.cc
@@ -152,8 +152,6 @@ size_t
 write_data(void *ptr, size_t size, size_t nmemb, void * /* stream */)
 {
   response.append((char *)ptr, size * nmemb);
-  // cout << "appending: " << size * nmemb << endl;
-  // int written = fwrite(ptr, size, nmemb, (FILE *)stream);
   return size * nmemb;
 }
 


[trafficserver] 03/11: Removes compiler flag overrides related to obsolete intree LuaJIT build

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 813e9c5faedee321d755044a32e28c0bdf47a62f
Author: Randall Meyer <ra...@yahoo.com>
AuthorDate: Thu Jul 12 12:09:40 2018 -0700

     Removes compiler flag overrides related to obsolete intree LuaJIT build
    
    (cherry picked from commit 4d4a2d22bfd13b610291e1e0ba81a724deff42da)
---
 configure.ac | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/configure.ac b/configure.ac
index 00cd405..c78d04b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1952,20 +1952,6 @@ iocore_include_dirs="\
 -I\$(abs_top_srcdir)/iocore/utils \
 -I\$(abs_top_srcdir)/iocore/dns"
 
-# Flags for buildit LuaJIT itself. We take the latest version
-# of the generic flags, plus any Lua-specific flags so that we
-# can strip the coverage flags from Lua while keeping them by
-# default everywhere else.
-TS_ADDTO(LUAJIT_CFLAGS, [$CFLAGS $luajit_cflags])
-AC_SUBST([LUAJIT_CFLAGS])
-
-TS_REMOVEFROM(LUAJIT_CFLAGS, "-fsanitize=address")
-TS_REMOVEFROM(LUAJIT_CFLAGS, "-fsanitize=thread")
-TS_REMOVEFROM(LUAJIT_CFLAGS, "-fsanitize=memory")
-TS_REMOVEFROM(LUAJIT_CFLAGS, "-fprofile-instr-generate")
-TS_REMOVEFROM(LUAJIT_CFLAGS, "-fcoverage-mapping")
-TS_REMOVEFROM(LUAJIT_CFLAGS, "--coverage")
-
 AC_SUBST([AM_CPPFLAGS])
 AC_SUBST([AM_CFLAGS])
 AC_SUBST([AM_CXXFLAGS])


[trafficserver] 02/11: Enhances detection of luajit

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit de4798328a31630a5ae7695c7b09bbec563b10d1
Author: Randall Meyer <ra...@yahoo.com>
AuthorDate: Tue Jul 10 16:27:34 2018 -0700

    Enhances detection of luajit
    
    if --with-luajit is specified, it will be used, otherwise use pkg-config
    or look in /usr and /usr/local
    
    (cherry picked from commit ba93177dc5f8cc4a943b96b704170b5eba43ce91)
---
 build/luajit.m4                    | 176 +++++++++++++++++++++++++++++++++++++
 configure.ac                       |  44 +---------
 doc/admin-guide/plugins/lua.en.rst |   6 +-
 plugins/lua/Makefile.inc           |   2 +-
 src/traffic_server/Makefile.inc    |   4 +
 5 files changed, 187 insertions(+), 45 deletions(-)

diff --git a/build/luajit.m4 b/build/luajit.m4
new file mode 100644
index 0000000..6ca0251
--- /dev/null
+++ b/build/luajit.m4
@@ -0,0 +1,176 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements.  See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License.  You may obtain a copy of the License at
+dnl
+dnl     http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+dnl
+dnl luajit.m4: Trafficserver's luajit autoconf macros
+dnl
+
+dnl
+dnl TS_CHECK_LUAJIT: look for luajit libraries and headers
+dnl
+AC_DEFUN([TS_CHECK_LUAJIT], [
+has_luajit=0
+AC_ARG_WITH(luajit, [AC_HELP_STRING([--with-luajit=DIR], [use a specific luajit library])],
+[
+  if test "x$withval" != "xyes" && test "x$withval" != "x"; then
+    luajit_base_dir="$withval"
+    if test "$withval" != "no"; then
+      has_luajit=1
+
+      case "$withval" in
+      *":"*)
+        luajit_include="`echo $withval | sed -e 's/:.*$//'`"
+        luajit_ldflags="`echo $withval | sed -e 's/^.*://'`"
+        AC_MSG_CHECKING(checking for luajit includes in $luajit_include libs in $luajit_ldflags)
+        ;;
+      *)
+        # looking for versioned subdir
+        for version in 2.0 2.1 ; do
+            dir="$withval/include/luajit-$version"
+            AC_MSG_CHECKING(checking for luajit in $dir)
+            if test -d $dir; then
+                AC_MSG_RESULT([ok])
+                luajit_include=$dir
+                break
+            else
+                AC_MSG_RESULT([not found])
+            fi
+        done
+
+        if test "x$luajit_include" = "x"; then
+            AC_MSG_ERROR([*** could not find luajit include dir ***])
+        fi
+
+        luajit_ldflags="$withval/lib"
+        ;;
+      esac
+
+    fi
+  fi
+
+  if test -d $luajit_include && test -d $luajit_ldflags && test -f $luajit_include/luajit.h; then
+    AC_MSG_RESULT([ok])
+  else
+    AC_MSG_RESULT([not found])
+  fi
+
+if test "$has_luajit" != "0"; then
+  saved_ldflags=$LDFLAGS
+  saved_cppflags=$CPPFLAGS
+  luajit_have_headers=0
+  luajit_have_libs=0
+
+  TS_ADDTO(CPPFLAGS, [-I${luajit_include}])
+  if test "$luajit_base_dir" != "/usr"; then
+    TS_ADDTO(LDFLAGS, [-L${luajit_ldflags}])
+    TS_ADDTO_RPATH(${luajit_ldflags})
+  fi
+
+  AC_CHECK_LIB([luajit-5.1], luaopen_jit, [luajit_have_libs=1])
+  if test "$luajit_have_libs" == "1"; then
+    AC_CHECK_HEADERS(luajit.h, [luajit_have_headers=1])
+  fi
+
+  if test "$luajit_have_headers" == "1"; then
+    AC_SUBST([LUAJIT_LDFLAGS], ["-L${luajit_ldflags} -lluajit-5.1"])
+    AC_SUBST([LUAJIT_CPPFLAGS], [-I${luajit_include}])
+    enable_luajit=yes
+  else
+    has_luajit=0
+    AC_MSG_ERROR([*** luajit requested but either libluajit-5.1 or luajit.h cannot be found ***])
+  fi
+
+  CPPFLAGS=$saved_cppflags
+  LDFLAGS=$saved_ldflags
+fi
+],
+[
+# use pkg-config to search for it
+#
+
+PKG_CHECK_MODULES([LUAJIT], [luajit >= 2.0.4], [
+   AC_SUBST([LUAJIT_LDFLAGS], [$LUAJIT_LIBS])
+   AC_SUBST([LUAJIT_CPPFLAGS], [$LUAJIT_CFLAGS])
+   enable_luajit=yes
+],
+[
+# look in /usr and /usr/local for what we need
+#
+
+AC_MSG_CHECKING([for luajit location])
+  # looking for versioned subdir
+  for version in 2.0 2.1; do
+    for lua_prefix in /usr/local /usr; do
+      dir="$lua_prefix/include/luajit-$version"
+
+      if test -d $dir; then
+        luajit_base_dir=$lua_prefix
+        luajit_include=$dir
+        luajit_ldflags=$lua_prefix/lib
+        break
+      fi
+    done
+  done
+
+  if test "x$luajit_base_dir" = "x"; then
+    enable_luajit=no
+    AC_MSG_RESULT([not found])
+  else
+    enable_luajit=yes
+    AC_MSG_RESULT([$dir])
+  fi
+
+if test "$enable_luajit" != "no"; then
+  saved_ldflags=$LDFLAGS
+  saved_cppflags=$CPPFLAGS
+  luajit_have_headers=0
+  luajit_have_libs=0
+
+  TS_ADDTO(CPPFLAGS, [-I${luajit_include}])
+  if test "$luajit_base_dir" != "/usr"; then
+    TS_ADDTO(LDFLAGS, [-L${luajit_ldflags}])
+    TS_ADDTO_RPATH(${luajit_ldflags})
+  fi
+
+  AC_CHECK_LIB([luajit-5.1], luaopen_jit, [luajit_have_libs=1])
+  if test "$luajit_have_libs" == "1"; then
+    AC_CHECK_HEADERS(luajit.h, [luajit_have_headers=1])
+  fi
+
+  if test "$luajit_have_headers" == "1"; then
+    AC_SUBST([LUAJIT_LDFLAGS], ["-L${luajit_ldflags} -lluajit-5.1"])
+    AC_SUBST([LUAJIT_CPPFLAGS], [-I${luajit_include}])
+    enable_luajit=yes
+  else
+    has_luajit=0
+  fi
+
+  CPPFLAGS=$saved_cppflags
+  LDFLAGS=$saved_ldflags
+fi
+
+])
+])
+
+TS_ARG_ENABLE_VAR([has],[luajit])
+AM_CONDITIONAL([HAS_LUAJIT], [test 0 -ne $has_luajit])
+
+# On Darwin, LuaJIT requires magic link options for a program loading or running with LuaJIT,
+# otherwise it will crash in luaL_openlibs() at startup.  See http://luajit.org/install.html for more details
+AC_SUBST([LUAJIT_DARWIN_LDFLAGS], ["-Wl,-pagezero_size,10000 -Wl,-image_base,100000000"])
+AM_CONDITIONAL([IS_DARWIN], [test x$(uname) = xDarwin])
+
+])
diff --git a/configure.ac b/configure.ac
index a69743e..00cd405 100644
--- a/configure.ac
+++ b/configure.ac
@@ -348,18 +348,6 @@ AC_ARG_WITH([profiler],
 )
 AC_MSG_RESULT([$with_profiler])
 
-# System luajit
-AC_MSG_CHECKING([whether to enable luajit])
-AC_ARG_ENABLE([luajit],
-  [AS_HELP_STRING([--enable-luajit],[enable support for system-installed luajit])],
-  [enable_luajit=yes],
-  [enable_luajit=no]
-)
-AC_MSG_RESULT([$enable_luajit])
-TS_ARG_ENABLE_VAR([has],[luajit])
-AM_CONDITIONAL([HAS_LUAJIT], [test 0 -ne $has_luajit])
-
-
 # Disable all static library builds
 AC_DISABLE_STATIC
 
@@ -1232,35 +1220,6 @@ TS_CHECK_ZLIB
 TS_CHECK_LZMA
 
 #
-# System LuaJIT
-#
-
-if test "x$enable_luajit" == "xyes"; then
-    saveLIBS=$LIBS
-    LIBS=""
-    AC_CHECK_HEADER(lua.h, [],
-                    [LUAJIT_PKGCONFIG=1])
-    AC_CHECK_LIB(luajit-5.1, luaL_newstate, [],
-                 [LUAJIT_PKGCONFIG=1])
-    if test "x$LUAJIT_PKGCONFIG" != "x"; then
-        PKG_CHECK_MODULES([LUAJIT], [luajit < 2.1.0, luajit >= 2.0.0], [
-            AC_SUBST([LIBLUAJIT], [$LUAJIT_LIBS])
-            TS_ADDTO(AM_CPPFLAGS, [$LUAJIT_CFLAGS])
-            # On Darwin LuaJIT requires magic link options, otherwise it will crash in luaL_openlibs() at startup. See
-            # http://luajit.org/install.html.
-            case $host_os_def in
-            darwin)
-                LUAJIT_LDFLAGS="-Wl,-pagezero_size,10000 -Wl,-image_base,100000000"
-                ;;
-            esac
-        ], [AC_MSG_ERROR([*** luajit requested but either libluajit-5.1 or lua.h cannot be found ***])])
-    else
-        AC_SUBST([LIBLUAJIT], [$LIBS])
-    fi
-    LIBS=$saveLIBS
-fi
-
-#
 # Tcl macros provided by build/tcl.m4
 #
 # this will error out if tclConfig.sh is not found
@@ -1316,6 +1275,9 @@ fi
 # Check for optional brotli library
 TS_CHECK_BROTLI
 
+# Check for optional luajit library
+TS_CHECK_LUAJIT
+
 #
 # Enable experimental/uri_singing plugin
 # This is here, instead of above, because it needs to know if PCRE is available.
diff --git a/doc/admin-guide/plugins/lua.en.rst b/doc/admin-guide/plugins/lua.en.rst
index bf9eba3..57efc7b 100644
--- a/doc/admin-guide/plugins/lua.en.rst
+++ b/doc/admin-guide/plugins/lua.en.rst
@@ -68,13 +68,13 @@ Synopsis
 Installation
 ============
 
-This plugin is only built if LuaJIT (>2.0.4) is installed and the configure option
+This plugin is only built if LuaJIT (>2.0.4) is installed. The configure option
 
 ::
 
-    --enable-luajit
+    --with-luajit=<path to luajit prefix>
 
-is given at build time.
+can be used to specify a LuaJIT install. Otherwise, configure will use pkg-config to find a viable installation.
 
 Configuration
 =============
diff --git a/plugins/lua/Makefile.inc b/plugins/lua/Makefile.inc
index 954d284..adcdde5 100644
--- a/plugins/lua/Makefile.inc
+++ b/plugins/lua/Makefile.inc
@@ -15,7 +15,7 @@
 #  limitations under the License.
 
 lua_tslua_la_CPPFLAGS = $(AM_CPPFLAGS) $(LUAJIT_CPPFLAGS)
-lua_tslua_la_LDFLAGS = $(AM_LDFLAGS) $(LIBLUAJIT)
+lua_tslua_la_LDFLAGS = $(AM_LDFLAGS) $(LUAJIT_LDFLAGS)
 
 pkglib_LTLIBRARIES += lua/tslua.la
 
diff --git a/src/traffic_server/Makefile.inc b/src/traffic_server/Makefile.inc
index 4ae3687..804248f 100644
--- a/src/traffic_server/Makefile.inc
+++ b/src/traffic_server/Makefile.inc
@@ -95,3 +95,7 @@ traffic_server_traffic_server_LDADD += \
 	@OPENSSL_LIBS@ \
 	@YAMLCPP_LIBS@ \
 	-lm
+
+if IS_DARWIN
+traffic_server_traffic_server_LDADD += $(LUAJIT_DARWIN_LDFLAGS)
+endif


[trafficserver] 10/11: Fixes spelling

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit dad12a84ec91b45faefc328e0446c995e7783a8b
Author: Randall Meyer <ra...@yahoo.com>
AuthorDate: Fri Jul 13 11:27:22 2018 -0700

    Fixes spelling
    
    (cherry picked from commit e632e46670540e8e3c3138ae239197aa8243a983)
---
 src/traffic_server/HostStatus.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/traffic_server/HostStatus.cc b/src/traffic_server/HostStatus.cc
index 95e1b95..e210ee5 100644
--- a/src/traffic_server/HostStatus.cc
+++ b/src/traffic_server/HostStatus.cc
@@ -125,7 +125,7 @@ HostStatus::setHostStatus(const char *name, HostStatus_t status, const unsigned
 
   // log it.
   if (status == HostStatus_t::HOST_STATUS_DOWN) {
-    Note("Host %s has been marked down, down_time: %d - %s.", name, down_time, down_time == 0 ? "indefinatley." : "seconds.");
+    Note("Host %s has been marked down, down_time: %d - %s.", name, down_time, down_time == 0 ? "indefinitely." : "seconds.");
   } else {
     Note("Host %s has been marked up.", name);
   }


[trafficserver] 01/11: Doc: Fix build errors in logging. These are artifacts of the YAML update and the shn changes.

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit cf42cca27b08567a1369dfb59a3cc6a8207be26b
Author: Alan M. Carroll <am...@apache.org>
AuthorDate: Tue Jul 3 10:57:49 2018 -0500

    Doc: Fix build errors in logging.
    These are artifacts of the YAML update and the shn changes.
    
    (cherry picked from commit d13931ae263a83f0a23bbdbf7687a2e364b3ceed)
---
 doc/admin-guide/files/logging.yaml.en.rst | 62 +++++++++++++++----------------
 doc/admin-guide/logging/examples.en.rst   |  3 +-
 2 files changed, 32 insertions(+), 33 deletions(-)

diff --git a/doc/admin-guide/files/logging.yaml.en.rst b/doc/admin-guide/files/logging.yaml.en.rst
index 30fc173..00be1ec 100644
--- a/doc/admin-guide/files/logging.yaml.en.rst
+++ b/doc/admin-guide/files/logging.yaml.en.rst
@@ -291,37 +291,37 @@ The following subsections cover the contents of the table which should be
 passed when creating your logging object. Only ``Filename`` and ``Format`` are
 required.
 
-=================== =========== ===============================================
-Name                Type        Description
-=================== =========== ===============================================
-filename            string      The name of the logfile relative to the default
-                                logging directory (set with
-                                :ts:cv:`proxy.config.log.logfile_dir`).
-format              string      a string with a valid named format specification.
-header              string      If present, emitted as the first line of each
-                                new log file.
-rolling_enabled     *see below* Determines the type of log rolling to use (or
-                                whether to disable rolling). Overrides
-                                :ts:cv:`proxy.config.log.rolling_enabled`.
-rolling_interval_sec number     Interval in seconds between log file rolling.
-                                Overrides
-                                :ts:cv:`proxy.config.log.rolling_interval_sec`.
-rolling_offset_hr   number      Specifies an hour (from 0 to 23) at which log
-                                rolling is guaranteed to align. Only has an
-                                effect if RollingIntervalSec is set to greater
-                                than one hour. Overrides
-                                :ts:cv:`proxy.config.log.rolling_offset_hr`.
-rolling_size_mb     number      Size, in megabytes, at which log files are
-                                rolled.
-filters             array of    The optional list of filter objects which
-                    filters     restrict the individual events logged. The array
-                                may only contain one accept filter.
-collation_hosts     array of    If present, one or more strings specifying the
-                    strings     log collation hosts to which logs should be
-                                delivered, each in the form of "<ip>:<port>".
-                                :ref:`admin-logging-collation` for more
-                                information.
-=================== =========== ===============================================
+====================== =========== =================================================
+Name                   Type        Description
+====================== =========== =================================================
+filename               string      The name of the logfile relative to the default
+                                   logging directory (set with
+                                   :ts:cv:`proxy.config.log.logfile_dir`).
+format                 string      a string with a valid named format specification.
+header                 string      If present, emitted as the first line of each
+                                   new log file.
+rolling_enabled        *see below* Determines the type of log rolling to use (or
+                                   whether to disable rolling). Overrides
+                                   :ts:cv:`proxy.config.log.rolling_enabled`.
+rolling_interval_sec   number      Interval in seconds between log file rolling.
+                                   Overrides
+                                   :ts:cv:`proxy.config.log.rolling_interval_sec`.
+rolling_offset_hr      number      Specifies an hour (from 0 to 23) at which log
+                                   rolling is guaranteed to align. Only has an
+                                   effect if RollingIntervalSec is set to greater
+                                   than one hour. Overrides
+                                   :ts:cv:`proxy.config.log.rolling_offset_hr`.
+rolling_size_mb        number      Size, in megabytes, at which log files are
+                                   rolled.
+filters                array of    The optional list of filter objects which
+                       filters     restrict the individual events logged. The array
+                                   may only contain one accept filter.
+collation_hosts        array of    If present, one or more strings specifying the
+                       strings     log collation hosts to which logs should be
+                                   delivered, each in the form of "<ip>:<port>".
+                                   :ref:`admin-logging-collation` for more
+                                   information.
+====================== =========== =================================================
 
 Enabling log rolling may be done globally in :file:`records.config`, or on a
 per-log basis by passing appropriate values for the ``rolling_enabled`` key. The
diff --git a/doc/admin-guide/logging/examples.en.rst b/doc/admin-guide/logging/examples.en.rst
index 466b520..df4d957 100644
--- a/doc/admin-guide/logging/examples.en.rst
+++ b/doc/admin-guide/logging/examples.en.rst
@@ -199,7 +199,7 @@ No. Field    Description
              hex.
 8   caun     The username of the authenticated client. A hyphen (``-``)
              means that no authentication was required.
-9   phr/shn The proxy hierarchy route. The route |TS| used to retrieve the
+9   phr/shn  The proxy hierarchy route. The route |TS| used to retrieve the
              object.
 10  psct     The proxy response content type. The object content type taken
              from the |TS| response header.
@@ -325,4 +325,3 @@ the request to clients during that hour.
      filters:
      - originfilter
      filename: origin_access_summary
-


[trafficserver] 05/11: Cleans up LDADDs in traffic_server

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit ed41c18dd69816da2a312b334480733d27b319c1
Author: Randall Meyer <ra...@yahoo.com>
AuthorDate: Thu Jul 12 12:48:00 2018 -0700

    Cleans up LDADDs in traffic_server
    
    (cherry picked from commit 113fb905f76802fd7dbab24c420e7983530f3411)
---
 src/traffic_server/Makefile.inc | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/traffic_server/Makefile.inc b/src/traffic_server/Makefile.inc
index 804248f..8175f78 100644
--- a/src/traffic_server/Makefile.inc
+++ b/src/traffic_server/Makefile.inc
@@ -62,7 +62,6 @@ endif
 traffic_server_traffic_server_LDADD = \
 	$(top_builddir)/proxy/http/libhttp.a \
 	$(top_builddir)/proxy/http/remap/libhttp_remap.a \
-	$(top_builddir)/proxy/http/remap/libhttp_remap.a \
 	$(top_builddir)/proxy/http2/libhttp2.a \
 	$(top_builddir)/proxy/logging/liblogging.a \
 	$(top_builddir)/proxy/logging/liblogcollation.a \
@@ -76,12 +75,8 @@ traffic_server_traffic_server_LDADD = \
 	$(top_builddir)/iocore/cache/libinkcache.a \
 	$(top_builddir)/iocore/aio/libinkaio.a \
 	$(top_builddir)/lib/ts/libtsutil.la \
-	$(top_builddir)/proxy/libproxy.a
-
-# ToDo: When we remove this, we hould merge the two _LDADD rules here
-traffic_server_traffic_server_LDADD += \
+	$(top_builddir)/proxy/libproxy.a \
 	$(top_builddir)/iocore/net/libinknet.a \
-	$(top_builddir)/iocore/eventsystem/libinkevent.a \
 	$(top_builddir)/lib/records/librecords_p.a \
 	$(top_builddir)/iocore/eventsystem/libinkevent.a \
 	$(top_builddir)/lib/tsconfig/libtsconfig.la \


[trafficserver] 07/11: Fixes some var-args missing va_start/end

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 0815a8578cac438a4b3d9ba1af263c5b35978721
Author: Katsutoshi Ikenoya <ki...@yahoo-corp.jp>
AuthorDate: Tue Jul 17 10:52:08 2018 -0400

    Fixes some var-args missing va_start/end
    
    This was introduced in
    
         https://github.com/apache/trafficserver/pull/1299
    
    But, the good news is that this has not been part of a release.
    
    (cherry picked from commit 7acfcfbc69d7ab88517f4090f1d168a960a5d151)
---
 lib/ts/ink_sprintf.cc        |  1 +
 proxy/http/HttpBodyFactory.h | 10 ++++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/lib/ts/ink_sprintf.cc b/lib/ts/ink_sprintf.cc
index 0053384..46db8c3 100644
--- a/lib/ts/ink_sprintf.cc
+++ b/lib/ts/ink_sprintf.cc
@@ -69,6 +69,7 @@ ink_bvsprintf(char *buffer, const char *format, va_list ap)
   const char *s;
   char *d, *p, *s_val, d_buffer[32];
   va_list ap_local;
+
   va_copy(ap_local, ap);
 
   s = format;
diff --git a/proxy/http/HttpBodyFactory.h b/proxy/http/HttpBodyFactory.h
index 2ca8693..19145e9 100644
--- a/proxy/http/HttpBodyFactory.h
+++ b/proxy/http/HttpBodyFactory.h
@@ -162,15 +162,21 @@ public:
   getFormat(int64_t max_buffer_length, int64_t *resulting_buffer_length, const char *format, ...)
   {
     char *msg = nullptr;
-    va_list ap;
     if (format) {
+      va_list ap;
+
+      va_start(ap, format);
+
       // The length from ink_bvsprintf includes the trailing NUL, so adjust the final
-      // length accordingly.
+      // length accordingly. Note that ink_bvsprintf() copies the va_list, so we only
+      // have to set it up once.
       int l = ink_bvsprintf(nullptr, format, ap);
+
       if (l <= max_buffer_length) {
         msg                      = (char *)ats_malloc(l);
         *resulting_buffer_length = ink_bvsprintf(msg, format, ap) - 1;
       }
+      va_end(ap);
     }
     return msg;
   }


[trafficserver] 04/11: Cleans up brotli compiler and linker flags

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit f84abcf1de2b54cef00d6a16b516d393e6d24d56
Author: Randall Meyer <ra...@yahoo.com>
AuthorDate: Thu Jul 12 12:35:36 2018 -0700

    Cleans up brotli compiler and linker flags
    
    Use more standard form of X_FLAGS variable naming and switch to
    uppercase LIBBROTLIENC for pkg-config to match other libraries
    
    (cherry picked from commit c3f0582e9273cc6cfea6ffd96a0c2432828f7110)
---
 build/brotli.m4               | 18 +++++++++---------
 plugins/compress/Makefile.inc |  4 ++--
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/build/brotli.m4 b/build/brotli.m4
index 1984552..a3189b6 100644
--- a/build/brotli.m4
+++ b/build/brotli.m4
@@ -31,8 +31,8 @@ AC_ARG_WITH(brotli, [AC_HELP_STRING([--with-brotli=DIR],[use a specific brotli l
       has_brotli=1
       case "$withval" in
       *":"*)
-        brotli_include="`echo $withval |sed -e 's/:.*$//'`"
-        brotli_ldflags="`echo $withval |sed -e 's/^.*://'`"
+        brotli_include="`echo $withval | sed -e 's/:.*$//'`"
+        brotli_ldflags="`echo $withval | sed -e 's/^.*://'`"
         AC_MSG_CHECKING(checking for brotli includes in $brotli_include libs in $brotli_ldflags )
         ;;
       *)
@@ -66,8 +66,8 @@ if test "$has_brotli" != "0"; then
     AC_CHECK_HEADERS(brotli/encode.h, [brotli_have_headers=1])
   fi
   if test "$brotli_have_headers" != "0"; then
-    AC_SUBST([LIB_BROTLIENC], [-lbrotlienc])
-    AC_SUBST([CFLAGS_BROTLIENC], [-I${brotli_include}])
+    AC_SUBST([BROTLIENC_LIB], [-lbrotlienc])
+    AC_SUBST([BROTLIENC_CFLAGS], [-I${brotli_include}])
   else
     has_brotli=0
     CPPFLAGS=$saved_cppflags
@@ -80,15 +80,15 @@ AC_CHECK_HEADER([brotli/encode.h], [], [has_brotli=0])
 AC_CHECK_LIB([brotlienc], BrotliEncoderCreateInstance, [], [has_brotli=0])
 
 if test "x$has_brotli" == "x0"; then
-    PKG_CHECK_EXISTS([libbrotlienc],
+    PKG_CHECK_EXISTS([LIBBROTLIENC],
     [
-      PKG_CHECK_MODULES([libbrotlienc], [libbrotlienc >= 0.6.0], [
-        AC_SUBST([LIB_BROTLIENC], [$libbrotlienc_LIBS])
-        AC_SUBST([CFLAGS_BROTLIENC], [$libbrotlienc_CFLAGS])
+      PKG_CHECK_MODULES([LIBBROTLIENC], [libbrotlienc >= 0.6.0], [
+        AC_SUBST([BROTLIENC_LIB], [$LIBBROTLIENC_LIBS])
+        AC_SUBST([BROTLIENC_CFLAGS], [$LIBBROTLIENC_CFLAGS])
       ], [])
     ], [])
 else
-    AC_SUBST([LIB_BROTLIENC], [-lbrotlienc])
+    AC_SUBST([BROTLIENC_LIB], [-lbrotlienc])
 fi
 ])
 
diff --git a/plugins/compress/Makefile.inc b/plugins/compress/Makefile.inc
index 223fd5d..329d174 100644
--- a/plugins/compress/Makefile.inc
+++ b/plugins/compress/Makefile.inc
@@ -18,6 +18,6 @@ pkglib_LTLIBRARIES += compress/compress.la
 compress_compress_la_SOURCES = compress/compress.cc compress/configuration.cc compress/misc.cc
 
 compress_compress_la_LDFLAGS = \
-  $(AM_LDFLAGS) $(LIB_BROTLIENC)
+  $(AM_LDFLAGS) $(BROTLIENC_LIB)
 
-compress_compress_la_CXXFLAGS = $(AM_CXXFLAGS) $(CFLAGS_BROTLIENC)
+compress_compress_la_CXXFLAGS = $(AM_CXXFLAGS) $(BROTLIENC_CFLAGS)


[trafficserver] 08/11: Fixing copy paste error in SNI yaml parsing

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 00de445197ec5c4bdbc60b12ab571ffe8900e950
Author: Pushkar Pradhan <pp...@oath.com>
AuthorDate: Mon Jul 30 12:08:27 2018 -0700

    Fixing copy paste error in SNI yaml parsing
    
    (cherry picked from commit 78d7c3fb89552d8fd2b114f01d795019109549e5)
---
 iocore/net/YamlSNIConfig.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iocore/net/YamlSNIConfig.cc b/iocore/net/YamlSNIConfig.cc
index 06f8c6f..da53fe2 100644
--- a/iocore/net/YamlSNIConfig.cc
+++ b/iocore/net/YamlSNIConfig.cc
@@ -79,7 +79,7 @@ template <> struct convert<YamlSNIConfig::Item> {
       return false; // servername must be present
     }
     if (node[TS_disable_H2]) {
-      item.fqdn = node[TS_disable_H2].as<bool>();
+      item.disable_h2 = node[TS_disable_H2].as<bool>();
     }
 
     // enum


[trafficserver] 06/11: Remove Http2ConnectionState::continued_buffer

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 7f7ced41977f91cd577ea621665adb12799f94e0
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Sun Jul 15 23:10:58 2018 +0900

    Remove Http2ConnectionState::continued_buffer
    
    continued_buffer is not used at all
    
    (cherry picked from commit e4a94b9cec7119c96fde1205611cb60ceed8428d)
---
 proxy/http2/Http2ConnectionState.h | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/proxy/http2/Http2ConnectionState.h b/proxy/http2/Http2ConnectionState.h
index a832216..bb2a2b2 100644
--- a/proxy/http2/Http2ConnectionState.h
+++ b/proxy/http2/Http2ConnectionState.h
@@ -130,11 +130,7 @@ public:
   {
     local_hpack_handle  = new HpackHandle(HTTP2_HEADER_TABLE_SIZE);
     remote_hpack_handle = new HpackHandle(HTTP2_HEADER_TABLE_SIZE);
-
-    continued_buffer.iov_base = nullptr;
-    continued_buffer.iov_len  = 0;
-
-    dependency_tree = new DependencyTree(Http2::max_concurrent_streams_in);
+    dependency_tree     = new DependencyTree(Http2::max_concurrent_streams_in);
   }
 
   void
@@ -148,9 +144,6 @@ public:
     mutex = nullptr; // magic happens - assigning to nullptr frees the ProxyMutex
     delete local_hpack_handle;
     delete remote_hpack_handle;
-
-    ats_free(continued_buffer.iov_base);
-
     delete dependency_tree;
     this->ua_session = nullptr;
 
@@ -326,7 +319,6 @@ private:
   //     "If the END_HEADERS bit is not set, this frame MUST be followed by
   //     another CONTINUATION frame."
   Http2StreamId continued_stream_id = 0;
-  IOVec continued_buffer;
   bool _scheduled                   = false;
   bool fini_received                = false;
   int recursion                     = 0;


[trafficserver] 09/11: Removes more references to traffic_cop and cop related functionality

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit d02fd2b84b45db5652c3d28d52649486af51a90f
Author: Randall Meyer <rr...@apple.com>
AuthorDate: Mon Jul 30 13:01:07 2018 -0700

    Removes more references to traffic_cop and cop related functionality
    
    (cherry picked from commit 044f9d6e683ac0dbfadd3a4b3cbb25183e53eebc)
---
 CMakeLists.txt                                     |  1 -
 doc/.tx/config                                     |  5 ----
 .../monitoring/statistics/core/general.en.rst      |  3 ---
 lib/records/Makefile.am                            |  7 +-----
 mgmt/Cop.h                                         | 27 ----------------------
 mgmt/api/include/mgmtapi.h                         |  2 +-
 src/traffic_ctl/config.cc                          |  5 ----
 src/traffic_manager/traffic_manager.cc             |  1 -
 8 files changed, 2 insertions(+), 49 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f88c463..3f1ee4f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -484,7 +484,6 @@ add_executable(ats
         mgmt/Alarms.h
         mgmt/BaseManager.cc
         mgmt/BaseManager.h
-        mgmt/Cop.h
         mgmt/FileManager.cc
         mgmt/FileManager.h
         mgmt/LocalManager.cc
diff --git a/doc/.tx/config b/doc/.tx/config
index 6be02f9..be18c3c 100644
--- a/doc/.tx/config
+++ b/doc/.tx/config
@@ -537,11 +537,6 @@ file_filter = locale/<lang>/LC_MESSAGES/appendices/command-line/index.en.po
 source_file = _build/locale/pot/appendices/command-line/index.en.pot
 source_lang = en
 
-[apache-traffic-server-6x.appendices--command-line--traffic_cop_en]
-file_filter = locale/<lang>/LC_MESSAGES/appendices/command-line/traffic_cop.en.po
-source_file = _build/locale/pot/appendices/command-line/traffic_cop.en.pot
-source_lang = en
-
 [apache-traffic-server-6x.appendices--command-line--traffic_crashlog_en]
 file_filter = locale/<lang>/LC_MESSAGES/appendices/command-line/traffic_crashlog.en.po
 source_file = _build/locale/pot/appendices/command-line/traffic_crashlog.en.pot
diff --git a/doc/admin-guide/monitoring/statistics/core/general.en.rst b/doc/admin-guide/monitoring/statistics/core/general.en.rst
index 2b4c95d..7ead32c 100644
--- a/doc/admin-guide/monitoring/statistics/core/general.en.rst
+++ b/doc/admin-guide/monitoring/statistics/core/general.en.rst
@@ -31,9 +31,6 @@ General
 
 .. ts:stat:: global proxy.node.config.reconfigure_time integer
 
-.. ts:stat:: global proxy.node.config.restart_required.cop integer
-   :type: flag
-
 .. ts:stat:: global proxy.node.config.restart_required.manager integer
    :type: flag
 
diff --git a/lib/records/Makefile.am b/lib/records/Makefile.am
index 134c48d..d87515f 100644
--- a/lib/records/Makefile.am
+++ b/lib/records/Makefile.am
@@ -27,7 +27,7 @@ AM_CPPFLAGS += \
 	-I$(abs_top_srcdir)/lib \
 	$(TS_INCLUDES)
 
-noinst_LIBRARIES = librecords_lm.a librecords_p.a librecords_cop.a
+noinst_LIBRARIES = librecords_lm.a librecords_p.a
 
 librecords_COMMON = \
 	I_RecAlarms.h \
@@ -66,10 +66,5 @@ librecords_p_a_SOURCES = \
 	P_RecProcess.h \
 	RecProcess.cc
 
-librecords_cop_a_SOURCES = \
-	RecConfigParse.cc \
-	RecFile.cc \
-	RecDebug.cc
-
 clang-tidy-local: $(sort $(DIST_SOURCES))
 	$(CXX_Clang_Tidy)
diff --git a/mgmt/Cop.h b/mgmt/Cop.h
deleted file mode 100644
index ed02db8..0000000
--- a/mgmt/Cop.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/** @file
-
-    Main entry point for the traffic_cop application.
-
-    @section license License
-
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you under the Apache License, Version 2.0 (the
-    "License"); you may not use this file except in compliance
-    with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-*/
-
-static const int cop_sleep_time      = 10;     // 10 sec
-static const int cop_manager_timeout = 3 * 60; //  3 min
-static const int cop_server_timeout  = 3 * 60; //  3 min
-static const int cop_kill_timeout    = 1 * 60; //  1 min
diff --git a/mgmt/api/include/mgmtapi.h b/mgmt/api/include/mgmtapi.h
index b9d87be..8fa22bc 100644
--- a/mgmt/api/include/mgmtapi.h
+++ b/mgmt/api/include/mgmtapi.h
@@ -98,7 +98,7 @@ typedef TSHandle TSIntList;    /* contains int* 's          */
 /*--- basic control operations --------------------------------------------*/
 
 typedef enum {
-  TS_ACTION_SHUTDOWN,    /* change requires user to stop then start the Traffic Server and Manager (restart Traffic Cop) */
+  TS_ACTION_SHUTDOWN,    /* change requires user to stop then start the Traffic Server and Manager */
   TS_ACTION_RESTART,     /* change requires restart Traffic Server and Traffic Manager */
   TS_ACTION_DYNAMIC,     /* change is already made in function call */
   TS_ACTION_RECONFIGURE, /* change requires TS to reread configuration files */
diff --git a/src/traffic_ctl/config.cc b/src/traffic_ctl/config.cc
index 42fdccc..14a7554 100644
--- a/src/traffic_ctl/config.cc
+++ b/src/traffic_ctl/config.cc
@@ -360,7 +360,6 @@ config_status(unsigned argc, const char **argv)
   CtrlMgmtRecord reconfig;
   CtrlMgmtRecord proxy;
   CtrlMgmtRecord manager;
-  CtrlMgmtRecord cop;
 
   CTRL_MGMT_CHECK(version.fetch("proxy.process.version.server.long"));
   CTRL_MGMT_CHECK(starttime.fetch("proxy.node.restarts.proxy.start_time"));
@@ -368,7 +367,6 @@ config_status(unsigned argc, const char **argv)
   CTRL_MGMT_CHECK(reconfig.fetch("proxy.node.config.reconfigure_required"));
   CTRL_MGMT_CHECK(proxy.fetch("proxy.node.config.restart_required.proxy"));
   CTRL_MGMT_CHECK(manager.fetch("proxy.node.config.restart_required.manager"));
-  CTRL_MGMT_CHECK(cop.fetch("proxy.node.config.restart_required.cop"));
 
   printf("%s\n", CtrlMgmtRecordValue(version).c_str());
   printf("Started at %s", timestr((time_t)starttime.as_int()).c_str());
@@ -381,9 +379,6 @@ config_status(unsigned argc, const char **argv)
   if (manager.as_int()) {
     printf("traffic_manager requires restarting\n");
   }
-  if (cop.as_int()) {
-    printf("traffic_cop requires restarting\n");
-  }
 
   return CTRL_EX_OK;
 }
diff --git a/src/traffic_manager/traffic_manager.cc b/src/traffic_manager/traffic_manager.cc
index e25a0b9..11794dd 100644
--- a/src/traffic_manager/traffic_manager.cc
+++ b/src/traffic_manager/traffic_manager.cc
@@ -705,7 +705,6 @@ main(int argc, const char **argv)
 
   RecRegisterStatInt(RECT_NODE, "proxy.node.config.restart_required.proxy", 0, RECP_NON_PERSISTENT);
   RecRegisterStatInt(RECT_NODE, "proxy.node.config.restart_required.manager", 0, RECP_NON_PERSISTENT);
-  RecRegisterStatInt(RECT_NODE, "proxy.node.config.restart_required.cop", 0, RECP_NON_PERSISTENT);
 
   RecRegisterStatInt(RECT_NODE, "proxy.node.config.draining", 0, RECP_NON_PERSISTENT);