You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2014/07/26 00:23:42 UTC

git commit: TS-2853: Minor bug fix (port matching for FQDN option).

Repository: trafficserver
Updated Branches:
  refs/heads/master c58eff542 -> 78e291fdf


TS-2853: Minor bug fix (port matching for FQDN option).


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/78e291fd
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/78e291fd
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/78e291fd

Branch: refs/heads/master
Commit: 78e291fdfb33f155b673e89467872a1b372815a4
Parents: c58eff5
Author: Alan M. Carroll <am...@network-geographics.com>
Authored: Fri Jul 25 17:22:49 2014 -0500
Committer: Alan M. Carroll <am...@network-geographics.com>
Committed: Fri Jul 25 17:22:49 2014 -0500

----------------------------------------------------------------------
 proxy/http/HttpSessionManager.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/78e291fd/proxy/http/HttpSessionManager.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSessionManager.cc b/proxy/http/HttpSessionManager.cc
index e42dd2c..8ad077b 100644
--- a/proxy/http/HttpSessionManager.cc
+++ b/proxy/http/HttpSessionManager.cc
@@ -82,6 +82,8 @@ ServerSessionPool::acquireSession(sockaddr const* addr, INK_MD5 const& hostname_
   if (TS_SERVER_SESSION_SHARING_MATCH_HOST == match_style) {
     // This is broken out because only in this case do we check the host hash first.
     HostHashTable::Location loc = m_host_pool.find(hostname_hash);
+    in_port_t port = ats_ip_port_cast(addr);
+    while (loc && port != ats_ip_port_cast(loc->server_ip)) ++loc; // scan for matching port.
     if (loc) {
       zret = loc;
       m_host_pool.remove(loc);
@@ -128,7 +130,7 @@ ServerSessionPool::releaseSession(HttpServerSession* ss)
   Debug("http_ss", "[%" PRId64 "] [release session] " "session placed into shared pool", ss->con_id);
 }
 
-//   Called from the NetProcessor to left us know that a
+//   Called from the NetProcessor to let us know that a
 //    connection has closed down
 //
 int
@@ -158,7 +160,7 @@ ServerSessionPool::eventHandler(int event, void *data)
   HttpConfigParams *http_config_params = HttpConfig::acquire();
   bool found = false;
 
-  for ( ServerSessionPool::IPHashTable::Location lh = m_ip_pool.find(addr) ; lh.isValid() ; ++lh ) {
+  for ( ServerSessionPool::IPHashTable::Location lh = m_ip_pool.find(addr) ; lh ; ++lh ) {
     if ((s = lh)->get_netvc() == net_vc) {
       // if there was a timeout of some kind on a keep alive connection, and
       // keeping the connection alive will not keep us above the # of max connections