[trafficserver] branch master updated: Remove ending period from error messages.

2017-05-15 Thread jpeach
This is an automated email from the ASF dual-hosted git repository.

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

The following commit(s) were added to refs/heads/master by this push:
   new  edc425d   Remove ending period from error messages.
edc425d is described below

commit edc425dbad1380e0af2dc3346c5df23b111a0112
Author: James Peach 
AuthorDate: Sun May 14 12:45:23 2017 -0700

Remove ending period from error messages.

Standardize error messages by removing the terminating period.
---
 .../api/functions/TSPluginInit.en.rst  |  2 +-
 .../api/functions/TSTrafficServerVersionGet.en.rst |  2 +-
 example/add_header/add_header.c|  2 +-
 example/append_transform/append_transform.c|  2 +-
 example/basic_auth/basic_auth.c|  2 +-
 example/blacklist_0/blacklist_0.c  |  2 +-
 example/blacklist_1/blacklist_1.c  |  2 +-
 example/bnull_transform/bnull_transform.c  |  2 +-
 example/cache_scan/cache_scan.cc   |  2 +-
 example/disable_http2/disable_http2.cc |  4 +-
 example/file_1/file_1.c|  2 +-
 example/hello/hello.c  |  2 +-
 example/lifecycle_plugin/lifecycle_plugin.c|  4 +-
 example/null_transform/null_transform.c|  4 +-
 example/output_header/output_header.c  |  2 +-
 example/protocol/Protocol.c|  6 +--
 example/protocol_stack/protocol_stack.cc   |  2 +-
 example/redirect_1/redirect_1.c|  4 +-
 example/remap_header_add/remap_header_add.cc   |  4 +-
 example/replace_header/replace_header.c|  4 +-
 example/response_header_1/response_header_1.c  |  2 +-
 example/server-push/server-push.c  |  2 +-
 example/server-transform/server-transform.c|  6 +--
 example/ssl-preaccept/ssl-preaccept.cc |  8 +--
 example/ssl-sni-whitelist/ssl-sni-whitelist.cc | 10 ++--
 example/ssl-sni/ssl-sni.cc | 10 ++--
 example/thread-1/thread-1.c|  2 +-
 example/thread-pool/psi.c  |  4 +-
 lib/cppapi/Plugin.cc   |  2 +-
 plugins/background_fetch/background_fetch.cc   |  6 +--
 plugins/esi/combo_handler.cc   | 10 ++--
 plugins/esi/esi.cc | 18 +++
 plugins/experimental/acme/acme.c   |  2 +-
 .../experimental/ats_pagespeed/ats_pagespeed.cc|  2 +-
 .../experimental/buffer_upload/buffer_upload.cc| 14 +++---
 .../experimental/cache_key_genid/cache_key_genid.c |  2 +-
 .../collapsed_forwarding/collapsed_forwarding.cc   |  2 +-
 .../custom_redirect/custom_redirect.cc |  4 +-
 .../memcached_remap/memcached_remap.cc |  2 +-
 plugins/experimental/mysql_remap/mysql_remap.cc|  2 +-
 plugins/experimental/remap_stats/remap_stats.c |  4 +-
 .../ssl_cert_loader/ssl-cert-loader.cc | 12 ++---
 .../stale_while_revalidate.c   |  6 +--
 .../experimental/stream_editor/stream_editor.cc|  2 +-
 plugins/experimental/ts_lua/ts_lua.c   |  2 +-
 plugins/experimental/ts_lua/ts_lua_package.c   | 20 
 plugins/experimental/url_sig/url_sig.c | 57 +++---
 plugins/header_rewrite/header_rewrite.cc   |  2 +-
 plugins/header_rewrite/parser.cc   |  4 +-
 plugins/healthchecks/healthchecks.c|  4 +-
 plugins/regex_revalidate/regex_revalidate.c| 10 ++--
 plugins/tcpinfo/tcpinfo.cc |  8 +--
 52 files changed, 148 insertions(+), 149 deletions(-)

diff --git a/doc/developer-guide/api/functions/TSPluginInit.en.rst 
b/doc/developer-guide/api/functions/TSPluginInit.en.rst
index 94ac644..232bb79 100644
--- a/doc/developer-guide/api/functions/TSPluginInit.en.rst
+++ b/doc/developer-guide/api/functions/TSPluginInit.en.rst
@@ -71,7 +71,7 @@ Examples
   info.support_email = "ts-api-supp...@mycompany.com";
 
   if (TSPluginRegister() != TS_SUCCESS) {
- TSError("[%s] Plugin registration failed.", PLUGIN_NAME);
+ TSError("[%s] Plugin registration failed", PLUGIN_NAME);
   }
}
 
diff --git a/doc/developer-guide/api/functions/TSTrafficServerVersionGet.en.rst 
b/doc/developer-guide/api/functions/TSTrafficServerVersionGet.en.rst
index a0d20a6..076ab1e 100644
--- a/doc/developer-guide/api/functions/TSTrafficServerVersionGet.en.rst
+++ b/doc/developer-guide/api/functions/TSTrafficServerVersionGet.en.rst
@@ -88,7 +88,7 @@ Example
 info.support_email = "ts-api-supp...@mycompany.com";
 
 if (TSPluginRegister() != TS_SUCCESS) {
-TSError("[%s] Plugin registration failed.", PLUGIN_NAME);
+TSError("[%s] Plugin registration failed", PLUGIN_NAME);
 

[trafficserver] branch master updated: Coverity CID #1241990 Resource leak

2017-05-15 Thread sorber
This is an automated email from the ASF dual-hosted git repository.

sorber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
   new  5dc703a   Coverity CID #1241990 Resource leak
5dc703a is described below

commit 5dc703a942af59903c656a975f5872a853ba6df2
Author: Phil Sorber 
AuthorDate: Thu May 11 20:47:54 2017 -0600

Coverity CID #1241990 Resource leak
---
 plugins/experimental/ssl_cert_loader/ssl-cert-loader.cc | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/plugins/experimental/ssl_cert_loader/ssl-cert-loader.cc 
b/plugins/experimental/ssl_cert_loader/ssl-cert-loader.cc
index 8aa16b8..21b479d 100644
--- a/plugins/experimental/ssl_cert_loader/ssl-cert-loader.cc
+++ b/plugins/experimental/ssl_cert_loader/ssl-cert-loader.cc
@@ -259,6 +259,7 @@ int Parse_order = 0;
 void
 Parse_Config(Value , ParsedSslValues _values)
 {
+  bool inserted = false;
   ParsedSslValues cur_values(orig_values);
   Value val = parent.find("ssl-key-name");
 
@@ -299,6 +300,7 @@ Parse_Config(Value , ParsedSslValues _values)
 // Store in appropriate table
 if (cur_values.server_name.length() > 0) {
   Lookup.tree.insert(cur_values.server_name, entry, Parse_order++);
+  inserted = true;
 }
 if (cur_values.server_ips.size() > 0) {
   for (auto _ip : cur_values.server_ips) {
@@ -309,11 +311,17 @@ Parse_Config(Value , ParsedSslValues _values)
 char val1[256], val2[256];
 server_ip.first.toString(val1, sizeof(val1));
 server_ip.second.toString(val2, sizeof(val2));
+inserted = true;
   }
 }
 if (entry != nullptr) {
-  for (const auto _name : cert_names) {
-Lookup.tree.insert(cert_name, entry, Parse_order++);
+  if (!cert_names.empty()) {
+for (const auto _name : cert_names) {
+  Lookup.tree.insert(cert_name, entry, Parse_order++);
+}
+  } else if (!inserted) {
+delete entry;
+TSError(PCP "cert_names is empty and entry not otherwise inserted!");
   }
 }
   }

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


[trafficserver] branch 1196479 created (now 51fb879)

2017-05-15 Thread bcall
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a change to branch 1196479
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.

at  51fb879   coverity 1196479: Uninitialized pointer field

This branch includes the following new commits:

   new  51fb879   coverity 1196479: Uninitialized pointer field

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


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


[trafficserver] 01/01: coverity 1196479: Uninitialized pointer field

2017-05-15 Thread bcall
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch 1196479
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 51fb8793347ca45f2aebad07c59b6726e56f310d
Author: Bryan Call 
AuthorDate: Thu May 11 17:24:57 2017 -0400

coverity 1196479: Uninitialized pointer field
---
 mgmt/LocalManager.cc | 19 ++-
 mgmt/LocalManager.h  | 28 ++--
 2 files changed, 16 insertions(+), 31 deletions(-)

diff --git a/mgmt/LocalManager.cc b/mgmt/LocalManager.cc
index 2a89fac..f3da137 100644
--- a/mgmt/LocalManager.cc
+++ b/mgmt/LocalManager.cc
@@ -147,22 +147,14 @@ LocalManager::processRunning()
   }
 }
 
-LocalManager::LocalManager(bool proxy_on) : BaseManager(), 
run_proxy(proxy_on), configFiles(nullptr)
+LocalManager::LocalManager(bool proxy_on) : BaseManager(), run_proxy(proxy_on)
 {
   bool found;
   ats_scoped_str rundir(RecConfigReadRuntimeDir());
   ats_scoped_str bindir(RecConfigReadBinDir());
   ats_scoped_str sysconfdir(RecConfigReadConfigDir());
 
-  syslog_facility = 0;
-
-  proxy_recoverable = true;
-  proxy_started_at  = -1;
-  proxy_launch_count= 0;
-  manager_started_at= time(nullptr);
-  proxy_launch_outstanding  = false;
-  mgmt_shutdown_outstanding = MGMT_PENDING_NONE;
-  proxy_running = 0;
+  manager_started_at = time(nullptr);
 
   RecRegisterStatInt(RECT_NODE, "proxy.node.proxy_running", 0, 
RECP_NON_PERSISTENT);
 
@@ -212,7 +204,6 @@ LocalManager::LocalManager(bool proxy_on) : BaseManager(), 
run_proxy(proxy_on),
   proxy_name   = REC_readString("proxy.config.proxy_name", 
);
   proxy_binary = REC_readString("proxy.config.proxy_binary", 
);
   env_prep = REC_readString("proxy.config.env_prep", 
);
-  proxy_options= nullptr;
 
   // Calculate proxy_binary from the absolute bin_path
   absolute_proxy_binary = Layout::relative_to(bindir, proxy_binary);
@@ -223,12 +214,6 @@ LocalManager::LocalManager(bool proxy_on) : BaseManager(), 
run_proxy(proxy_on),
 mgmt_fatal(0, "[LocalManager::LocalManager] please set bin path 
'proxy.config.bin_path' \n");
   }
 
-  watched_process_pid = -1;
-
-  process_server_sockfd = -1;
-  watched_process_fd= -1;
-  proxy_launch_pid  = -1;
-
   return;
 }
 
diff --git a/mgmt/LocalManager.h b/mgmt/LocalManager.h
index d35fe0d..f45ccef 100644
--- a/mgmt/LocalManager.h
+++ b/mgmt/LocalManager.h
@@ -88,13 +88,13 @@ public:
   bool processRunning();
 
   volatile bool run_proxy;
-  volatile bool proxy_recoverable; // false if traffic_server cannot recover 
with a reboot
+  volatile bool proxy_recoverable = true; // false if traffic_server cannot 
recover with a reboot
   volatile time_t manager_started_at;
-  volatile time_t proxy_started_at;
-  volatile int proxy_launch_count;
-  volatile bool proxy_launch_outstanding;
-  volatile ManagementPendingOperation mgmt_shutdown_outstanding;
-  volatile int proxy_running;
+  volatile time_t proxy_started_at  = -1;
+  volatile int proxy_launch_count   = 0;
+  volatile bool proxy_launch_outstanding= false;
+  volatile ManagementPendingOperation mgmt_shutdown_outstanding = 
MGMT_PENDING_NONE;
+  volatile int proxy_running= 0;
   HttpProxyPort::Group m_proxy_ports;
   // Local inbound addresses to bind, if set.
   IpAddr m_inbound_ip4;
@@ -106,19 +106,19 @@ public:
   char *absolute_proxy_binary;
   char *proxy_name;
   char *proxy_binary;
-  char *proxy_options; // These options should persist across proxy reboots
+  char *proxy_options = nullptr; // These options should persist across proxy 
reboots
   char *env_prep;
 
-  int process_server_sockfd;
-  volatile int watched_process_fd;
-  volatile pid_t proxy_launch_pid;
+  int process_server_sockfd   = -1;
+  volatile int watched_process_fd = -1;
+  volatile pid_t proxy_launch_pid = -1;
 
-  Alarms *alarm_keeper;
-  FileManager *configFiles;
+  Alarms *alarm_keeper = nullptr;
+  FileManager *configFiles = nullptr;
 
-  volatile pid_t watched_process_pid;
+  volatile pid_t watched_process_pid = -1;
 
-  int syslog_facility;
+  int syslog_facility = 0;
 
 #if TS_HAS_WCCP
   wccp::Cache wccp_cache;

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" .


[trafficserver] branch master updated: Fix version and virtualhost config cache sync.

2017-05-15 Thread gancho
This is an automated email from the ASF dual-hosted git repository.

gancho pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
   new  13804cc   Fix version and virtualhost config cache sync.
13804cc is described below

commit 13804cc4d863cabefdbf2ef4bb5d15d13d6339e8
Author: Gancho Tenev 
AuthorDate: Mon May 15 10:25:34 2017 -0700

Fix version and virtualhost config cache sync.
---
 plugins/s3_auth/s3_auth.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/s3_auth/s3_auth.cc b/plugins/s3_auth/s3_auth.cc
index 772bb55..d00a87b 100644
--- a/plugins/s3_auth/s3_auth.cc
+++ b/plugins/s3_auth/s3_auth.cc
@@ -131,10 +131,10 @@ public:
   _keyid_len = src->_keyid_len;
 }
 
-if (_version_modified) {
+if (src->_version_modified) {
   _version = src->_version;
 }
-if (_virt_host_modified) {
+if (src->_virt_host_modified) {
   _virt_host = src->_virt_host;
 }
   }

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


[trafficserver] branch master updated: Coverity 1375126, 1375120 Ignore drand48() warning in jtest.cc

2017-05-15 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

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

The following commit(s) were added to refs/heads/master by this push:
   new  7f7e2f1   Coverity 1375126, 1375120 Ignore drand48() warning in 
jtest.cc
7f7e2f1 is described below

commit 7f7e2f177c15435915742b106daff93a36059db9
Author: Leif Hedstrom 
AuthorDate: Mon May 15 08:53:28 2017 -0400

Coverity 1375126, 1375120 Ignore drand48() warning in jtest.cc
---
 tools/jtest/jtest.cc | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/jtest/jtest.cc b/tools/jtest/jtest.cc
index ba33890..61298b7 100644
--- a/tools/jtest/jtest.cc
+++ b/tools/jtest/jtest.cc
@@ -1385,8 +1385,8 @@ read_ftp_request(int sock)
   return 0;
 } else if (STREQ(buffer, "MDTM")) {
   double err_rand = 1.0;
-  // coverity[dont_call]
   if (ftp_mdtm_err_rate != 0.0) {
+// coverity[dont_call]
 err_rand = drand48();
   }
   if (err_rand < ftp_mdtm_err_rate) {
@@ -2759,7 +2759,9 @@ make_range_header(int sock, double dr, char *rbuf, int 
size_limit)
 return;
 
   tmp[0] = gen_bfc_dist(dr - 1.0);
+  // coverity[dont_call]
   tmp[1] = ((int)(drand48() * 100)) % (tmp[0] - 1 - 0 + 1);
+  // coverity[dont_call]
   tmp[2] = ((int)(drand48() * 100)) % (tmp[0] - 1 - 0 + 1) + tmp[1] + 100;
 
   if (tmp[0] > 100) {
@@ -2786,8 +2788,10 @@ make_range_header(int sock, double dr, char *rbuf, int 
size_limit)
 static void
 make_random_url(int sock, double *dr, double *h)
 {
+  // coverity[dont_call]
   *dr = drand48();
-  *h  = drand48();
+  // coverity[dont_call]
+  *h = drand48();
 
   if (zipf == 0.0) {
 if (*h < hitrate) {

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


[trafficserver] branch master updated: Coverity 1375119: unchecked return value

2017-05-15 Thread kichan
This is an automated email from the ASF dual-hosted git repository.

kichan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
   new  7d095b3   Coverity 1375119: unchecked return value
7d095b3 is described below

commit 7d095b37844ea69370414c42c768b4fe798d4b30
Author: Kit Chan 
AuthorDate: Mon May 15 07:46:27 2017 -0700

Coverity 1375119: unchecked return value
---
 plugins/experimental/ts_lua/ts_lua_fetch.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/plugins/experimental/ts_lua/ts_lua_fetch.c 
b/plugins/experimental/ts_lua/ts_lua_fetch.c
index cba3b08..cf5d5e9 100644
--- a/plugins/experimental/ts_lua/ts_lua_fetch.c
+++ b/plugins/experimental/ts_lua/ts_lua_fetch.c
@@ -269,11 +269,11 @@ ts_lua_fetch_one_item(lua_State *L, const char *url, 
size_t url_len, ts_lua_fetc
 clientaddr.sin_port = htons(port);
 if (!inet_aton(ipstr, (struct in_addr *)_addr.s_addr)) {
   p = NULL;
-  TSError("[%s] Client ip parse failed! Using defualt. [ip: %s]", 
TS_LUA_DEBUG_TAG, ipstr);
+  TSError("[%s] Client ip parse failed! Using default. [ip: %s]", 
TS_LUA_DEBUG_TAG, ipstr);
 }
   } else {
 p = NULL;
-TSError("[%s] Client ip parse failed! Using defualt. [addrstr: %s]", 
TS_LUA_DEBUG_TAG, addr);
+TSError("[%s] Client ip parse failed! Using default. [addrstr: %s]", 
TS_LUA_DEBUG_TAG, addr);
   }
 }
 
@@ -282,7 +282,9 @@ ts_lua_fetch_one_item(lua_State *L, const char *url, size_t 
url_len, ts_lua_fetc
 
   if (!p) {
 clientaddr.sin_port = htons(TS_LUA_FETCH_CLIENT_PORT);
-inet_aton(TS_LUA_FETCH_CLIENT_ADDRESS, (struct in_addr 
*)_addr.s_addr);
+if (!inet_aton(TS_LUA_FETCH_CLIENT_ADDRESS, (struct in_addr 
*)_addr.s_addr)) {
+  TSError("[%s] Error using default for client ip in fetch API. [ip: %s]", 
TS_LUA_DEBUG_TAG, TS_LUA_FETCH_CLIENT_ADDRESS);
+}
   }
 
   /* option */

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