trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject git commit: TS-1675: Adding api TSHttpTxnClientIncomingPortSet
Date Wed, 30 Jan 2013 19:48:06 GMT
Updated Branches:
  refs/heads/master 6d573ce58 -> 561269868


TS-1675: Adding api TSHttpTxnClientIncomingPortSet


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

Branch: refs/heads/master
Commit: 561269868855deb25f0925dffc61da50209420a8
Parents: 6d573ce
Author: Brian Geffon <briang@apache.org>
Authored: Wed Jan 30 11:47:57 2013 -0800
Committer: Brian Geffon <briang@apache.org>
Committed: Wed Jan 30 11:47:57 2013 -0800

----------------------------------------------------------------------
 CHANGES              |    2 ++
 proxy/InkAPI.cc      |    8 ++++++++
 proxy/api/ts/ts.h.in |    2 ++
 3 files changed, 12 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/56126986/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 0249742..85cfbe6 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,7 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 3.3.1
+  *) [TS-1675] Adding API method TSHttpTxnClientIncomingPortSet
+
   *) [TS-1674] TSStatIntDecrement is broken: the logic is flawed.
 
   *) [TS-1673] Remap with recv port is using the wrong port 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/56126986/proxy/InkAPI.cc
----------------------------------------------------------------------
diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index dbb33b2..f46ade6 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -5306,6 +5306,14 @@ TSHttpTxnServerAddrSet(TSHttpTxn txnp, struct sockaddr const* addr)
   }
 }
 
+void
+TSHttpTxnClientIncomingPortSet(TSHttpTxn txnp, int port)
+{
+  sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
+
+  HttpSM *sm = (HttpSM *) txnp;
+  sm->t_state.client_info.port = port;
+}
 
 // [amc] This might use the port. The code path should do that but it
 // hasn't been tested.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/56126986/proxy/api/ts/ts.h.in
----------------------------------------------------------------------
diff --git a/proxy/api/ts/ts.h.in b/proxy/api/ts/ts.h.in
index 8a2abd6..213b4e8 100644
--- a/proxy/api/ts/ts.h.in
+++ b/proxy/api/ts/ts.h.in
@@ -2269,6 +2269,8 @@ extern "C"
 
   tsapi TSReturnCode TSHttpTxnTransformRespGet(TSHttpTxn txnp, TSMBuffer* bufp, TSMLoc* offset);
 
+  tsapi void TSHttpTxnClientIncomingPortSet(TSHttpTxn txnp, int port);
+
   /** Get client address for transaction @a txnp.
       Retrieves the socket address of the remote client that has
       connected to Traffic Server for transaction @a txnp. The


Mime
View raw message