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 2014/10/03 18:39:56 UTC
git commit: Dont print stack garbage in SSLDiagnostic()
Repository: trafficserver
Updated Branches:
refs/heads/master f8ee03bc8 -> 3bb54ea82
Dont print stack garbage in SSLDiagnostic()
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/3bb54ea8
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/3bb54ea8
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/3bb54ea8
Branch: refs/heads/master
Commit: 3bb54ea825c9e3a310c760d45b5e2e2b97d36c3b
Parents: f8ee03b
Author: James Peach <jp...@apache.org>
Authored: Fri Oct 3 09:39:49 2014 -0700
Committer: James Peach <jp...@apache.org>
Committed: Fri Oct 3 09:39:49 2014 -0700
----------------------------------------------------------------------
iocore/net/SSLUtils.cc | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3bb54ea8/iocore/net/SSLUtils.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc
index 7428816..6767e50 100644
--- a/iocore/net/SSLUtils.cc
+++ b/iocore/net/SSLUtils.cc
@@ -864,12 +864,10 @@ SSLDiagnostic(const SrcLoc& loc, bool debug, SSLNetVConnection * vc, const char
int line, flags;
unsigned long es;
va_list ap;
+ ip_text_buffer ip_buf = { '\0' };
- ip_text_buffer ip_buf;
- bool ip_buf_flag = false;
if (vc) {
ats_ip_ntop(vc->get_remote_addr(), ip_buf, sizeof(ip_buf));
- ip_buf_flag = true;
}
es = CRYPTO_thread_id();
@@ -879,13 +877,13 @@ SSLDiagnostic(const SrcLoc& loc, bool debug, SSLNetVConnection * vc, const char
diags->log("ssl", DL_Debug, loc.file, loc.func, loc.line,
"SSL::%lu:%s:%s:%d%s%s%s%s", es, ERR_error_string(l, buf), file, line,
(flags & ERR_TXT_STRING) ? ":" : "", (flags & ERR_TXT_STRING) ? data : "",
- ip_buf_flag? ": peer address is " : "", ip_buf);
+ vc ? ": peer address is " : "", ip_buf);
}
} else {
diags->error(DL_Error, loc.file, loc.func, loc.line,
"SSL::%lu:%s:%s:%d%s%s%s%s", es, ERR_error_string(l, buf), file, line,
(flags & ERR_TXT_STRING) ? ":" : "", (flags & ERR_TXT_STRING) ? data : "",
- ip_buf_flag? ": peer address is " : "", ip_buf);
+ vc ? ": peer address is " : "", ip_buf);
}
// Tally desired stats (only client/server connection stats, not init