You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2014/05/22 20:04:44 UTC

git commit: TS-2818: TSHttpTxnServerAddrSet() doesn't update the server port Reviewed: Bryan Call

Repository: trafficserver
Updated Branches:
  refs/heads/master 729d0273c -> 174ae6777


TS-2818: TSHttpTxnServerAddrSet() doesn't update the server port
Reviewed: Bryan Call


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

Branch: refs/heads/master
Commit: 174ae677776f419b26c2fce7152b560eebc2d5ee
Parents: 729d027
Author: Bryan Call <bc...@apache.org>
Authored: Thu May 22 10:59:06 2014 -0700
Committer: Bryan Call <bc...@apache.org>
Committed: Thu May 22 11:03:58 2014 -0700

----------------------------------------------------------------------
 CHANGES         | 2 ++
 proxy/InkAPI.cc | 2 ++
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/174ae677/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 36c49d5..5bcfa08 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.0.0
 
+  *) [TS-2818] TSHttpTxnServerAddrSet() doesn't update the server port
+
   *) [TS-2793] Remove UnixNetVConnection::selected_next_protocol.
 
   *) [TS-2831] Add SPDY stream count statistic.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/174ae677/proxy/InkAPI.cc
----------------------------------------------------------------------
diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index d8bf08d..00c1469 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -5250,6 +5250,8 @@ TSHttpTxnServerAddrSet(TSHttpTxn txnp, struct sockaddr const* addr)
 
   HttpSM *sm = reinterpret_cast<HttpSM *>(txnp);
   if (ats_ip_copy(&sm->t_state.server_info.addr.sa, addr)) {
+    ats_ip_port_cast(&sm->t_state.server_info.addr.sa) = ats_ip_port_cast(addr);
+    sm->t_state.server_info.port = htons(ats_ip_port_cast(addr));
     sm->t_state.api_server_addr_set = true;
     return TS_SUCCESS;
   } else {