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 2013/06/04 21:54:03 UTC
[1/2] git commit: TS-1937: Prevent assert on SSL forward proxy
connect.
Updated Branches:
refs/heads/3.3.x 693a02f20 -> 8fd1c6a2d
TS-1937: Prevent assert on SSL forward proxy connect.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/0ca46440
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/0ca46440
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/0ca46440
Branch: refs/heads/3.3.x
Commit: 0ca4644050daf294bc08f2a0ead56e2075b1b881
Parents: 693a02f
Author: Alan M. Carroll <am...@network-geographics.com>
Authored: Tue Jun 4 13:32:18 2013 -0500
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Tue Jun 4 13:53:50 2013 -0600
----------------------------------------------------------------------
CHANGES | 2 ++
iocore/net/SSLNextProtocolAccept.cc | 6 +++---
2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0ca46440/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 0ddd9af..2adebc1 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 3.3.3
+ *) [TS-1937] Prevent assert on SSL forward proxy connect.
+
*) [TS-1907] Using the "ipv6" option for port configuration cancels the "ssl" option.
*) [TS-1927] Make ats_base64_decode able to handle the URL variant
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0ca46440/iocore/net/SSLNextProtocolAccept.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNextProtocolAccept.cc b/iocore/net/SSLNextProtocolAccept.cc
index a03da15..bfc2f0b 100644
--- a/iocore/net/SSLNextProtocolAccept.cc
+++ b/iocore/net/SSLNextProtocolAccept.cc
@@ -66,8 +66,8 @@ ssl_netvc_cast(int event, void * edata)
struct SSLNextProtocolTrampoline : public Continuation
{
explicit
- SSLNextProtocolTrampoline(const SSLNextProtocolAccept * npn)
- : Continuation(new_ProxyMutex()), npnParent(npn)
+ SSLNextProtocolTrampoline(const SSLNextProtocolAccept * npn, ProxyMutex* mutex)
+ : Continuation(mutex), npnParent(npn)
{
SET_HANDLER(&SSLNextProtocolTrampoline::ioCompletionEvent);
}
@@ -124,7 +124,7 @@ SSLNextProtocolAccept::mainEvent(int event, void * edata)
// the endpoint that there is an accept to handle until the read completes
// and we know which protocol was negotiated.
netvc->registerNextProtocolSet(&this->protoset);
- netvc->do_io(VIO::READ, NEW(new SSLNextProtocolTrampoline(this)), 0, this->buffer, 0);
+ netvc->do_io(VIO::READ, NEW(new SSLNextProtocolTrampoline(this, netvc->mutex)), 0, this->buffer, 0);
return EVENT_CONT;
default:
netvc->do_io(VIO::CLOSE);
[2/2] git commit: TS-1936 Make traffic_logstats honor the
log-directory as intended
Posted by zw...@apache.org.
TS-1936 Make traffic_logstats honor the log-directory as intended
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/8fd1c6a2
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/8fd1c6a2
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/8fd1c6a2
Branch: refs/heads/3.3.x
Commit: 8fd1c6a2de059ffb3342b29f61ab5f27109e8e3d
Parents: 0ca4644
Author: Leif Hedstrom <zw...@apache.org>
Authored: Tue Jun 4 13:37:38 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Tue Jun 4 13:53:51 2013 -0600
----------------------------------------------------------------------
CHANGES | 3 +++
proxy/logstats.cc | 25 +++++++++++++------------
2 files changed, 16 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8fd1c6a2/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 2adebc1..a6c227d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 3.3.3
+
+ *) [TS-1936] Make traffic_logstats honor the log-directory as intended.
+
*) [TS-1937] Prevent assert on SSL forward proxy connect.
*) [TS-1907] Using the "ipv6" option for port configuration cancels the "ssl" option.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8fd1c6a2/proxy/logstats.cc
----------------------------------------------------------------------
diff --git a/proxy/logstats.cc b/proxy/logstats.cc
index d61faaf..99e9639 100644
--- a/proxy/logstats.cc
+++ b/proxy/logstats.cc
@@ -754,6 +754,10 @@ struct ExitStatus
void append(const char *n) {
ink_strlcat(notice, n, sizeof(notice));
}
+
+ void append(const std::string s) {
+ ink_strlcat(notice, s.c_str(), sizeof(notice));
+ }
};
@@ -2211,10 +2215,12 @@ my_exit(const ExitStatus& status)
int
open_main_log(ExitStatus& status)
{
+ std::string logfile(Layout::get()->logdir);
int cnt = 3;
int main_fd;
- while (((main_fd = open("./squid.blog", O_RDONLY)) < 0) && --cnt) {
+ logfile.append("/squid.blog");
+ while (((main_fd = open(logfile.c_str(), O_RDONLY)) < 0) && --cnt) {
switch (errno) {
case ENOENT:
case EACCES:
@@ -2346,20 +2352,14 @@ main(int /* argc ATS_UNUSED */, char *argv[])
// Do the incremental parse of the default squid log.
if (cl.incremental) {
- // Get log directory
- if (Layout::get()->logdir) {
- exit_status.set(EXIT_CRITICAL, " missing log directory configuration");
- my_exit(exit_status);
- }
-
// Change directory to the log dir
- if (chdir(system_log_dir) < 0) {
+ if (chdir(Layout::get()->logdir) < 0) {
exit_status.set(EXIT_CRITICAL, " can't chdir to ");
- exit_status.append(system_log_dir);
+ exit_status.append(Layout::get()->logdir);
my_exit(exit_status);
}
- std::string sf_name(system_log_dir);
+ std::string sf_name(Layout::get()->logdir);
struct stat stat_buf;
int state_fd;
sf_name.append("/logstats.state");
@@ -2381,7 +2381,8 @@ main(int /* argc ATS_UNUSED */, char *argv[])
}
if ((state_fd = open(sf_name.c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR)) < 0) {
- exit_status.set(EXIT_CRITICAL, " can't open state file");
+ exit_status.set(EXIT_CRITICAL, " can't open state file ");
+ exit_status.append(sf_name);
my_exit(exit_status);
}
// Get an exclusive lock, if possible. Try for up to 20 seconds.
@@ -2454,7 +2455,7 @@ main(int /* argc ATS_UNUSED */, char *argv[])
last_state.st_ino = stat_buf.st_ino;
// Find the old log file.
- dirp = opendir(system_log_dir);
+ dirp = opendir(Layout::get()->logdir);
if (NULL == dirp) {
exit_status.set(EXIT_WARNING, " can't read log directory");
} else {