Repository: trafficserver Updated Branches: refs/heads/master b4529fd61 -> 50520e7fe
TS-3080: fix SSL session cache build Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/067df58b Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/067df58b Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/067df58b Branch: refs/heads/master Commit: 067df58b5273ffb7773e161b0f3dae6e13c6e60e Parents: b4529fd Author: James Peach <[email protected]> Authored: Thu Oct 9 08:57:56 2014 -0700 Committer: James Peach <[email protected]> Committed: Thu Oct 9 09:17:29 2014 -0700 ---------------------------------------------------------------------- CHANGES | 7 +++++-- iocore/net/SSLSessionCache.cc | 9 +++++---- iocore/net/SSLSessionCache.h | 10 ++++------ 3 files changed, 14 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/067df58b/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 12739ac..1f6d81d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,8 +1,11 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 5.2.0 - + + *) [TS-3120] Overlapping remap rank when using .include directives. + Author: Feifei Cai <[email protected]> + *) [TS-3080] Optimized SSL session caching - + *) [TS-3121] Prevent sending garbage HTTP/0.8 responses from SPDY *) [TS-3116] Add support for tracking the use of the ioBuffers http://git-wip-us.apache.org/repos/asf/trafficserver/blob/067df58b/iocore/net/SSLSessionCache.cc ---------------------------------------------------------------------- diff --git a/iocore/net/SSLSessionCache.cc b/iocore/net/SSLSessionCache.cc index c936ee7..5b36907 100644 --- a/iocore/net/SSLSessionCache.cc +++ b/iocore/net/SSLSessionCache.cc @@ -103,7 +103,7 @@ void SSLSessionBucket::insertSession(const SSLSessionID &id, const char *sni_nam size_t len = i2d_SSL_SESSION(sess, NULL); // make sure we're not going to need more than SSL_MAX_SESSION_SIZE bytes /* do not cache a session that's too big. */ if (len > (size_t) SSL_MAX_SESSION_SIZE) { - Debug("ssl.session_cache", "Unable to save SSL session because size of %" PRId64 " exceeds the max of %d", len, SSL_MAX_SESSION_SIZE); + Debug("ssl.session_cache", "Unable to save SSL session because size of %zd exceeds the max of %d", len, SSL_MAX_SESSION_SIZE); return; } @@ -194,7 +194,7 @@ void inline SSLSessionBucket::print(const char *ref_str) const { } fprintf(stderr, "-------------- BUCKET %p (%s) ----------------\n", this, ref_str); - fprintf(stderr, "Current Size: %d, Max Size: %" PRId64 "\n", queue.size, SSLConfigParams::session_cache_max_bucket_size); + fprintf(stderr, "Current Size: %d, Max Size: %zd\n", queue.size, SSLConfigParams::session_cache_max_bucket_size); fprintf(stderr, "Queue: \n"); SSLSession *node = queue.head; @@ -213,7 +213,7 @@ void inline SSLSessionBucket::removeOldestSession() { if (is_debug_tag_set("ssl.session_cache")) { char buf[old_head->session_id.len * 2 + 1]; old_head->session_id.toString(buf, sizeof(buf)); - Debug("ssl.session_cache", "Removing session '%s' from bucket %p because the bucket has size %d and max %" PRId64, buf, this, (queue.size + 1), SSLConfigParams::session_cache_max_bucket_size); + Debug("ssl.session_cache", "Removing session '%s' from bucket %p because the bucket has size %d and max %zd", buf, this, (queue.size + 1), SSLConfigParams::session_cache_max_bucket_size); } delete old_head; } @@ -234,7 +234,8 @@ void SSLSessionBucket::removeSession(const SSLSessionID &id) { } /* Session Bucket */ -SSLSessionBucket::SSLSessionBucket() : root(NULL) { +SSLSessionBucket::SSLSessionBucket() +{ Debug("ssl.session_cache", "Created new bucket %p with max size %ld", this, SSLConfigParams::session_cache_max_bucket_size); ink_mutex_init(&mutex, "session_bucket"); } http://git-wip-us.apache.org/repos/asf/trafficserver/blob/067df58b/iocore/net/SSLSessionCache.h ---------------------------------------------------------------------- diff --git a/iocore/net/SSLSessionCache.h b/iocore/net/SSLSessionCache.h index 283438a..ce5c8b1 100644 --- a/iocore/net/SSLSessionCache.h +++ b/iocore/net/SSLSessionCache.h @@ -19,8 +19,9 @@ limitations under the License. */ -#ifndef SSL_SESSION_CACHE_ -#define SSL_SESSION_CACHE_ +#ifndef __SSLSESSIONCACHE_H__ +#define __SSLSESSIONCACHE_H__ + #include "Map.h" #include "List.h" #include "ink_mutex.h" @@ -129,7 +130,6 @@ private: mutable ink_mutex mutex; CountQueue<SSLSession> queue; - SSLSession *root; }; class SSLSessionCache { @@ -144,6 +144,4 @@ public: SSLSessionBucket *session_bucket; }; -#endif - - +#endif /* __SSLSESSIONCACHE_H__ */
