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 2016/04/28 17:00:41 UTC
[trafficserver] 01/02: TSHttpTxnParentProxySet should take const
arguments.
This is an automated email from the ASF dual-hosted git repository.
jpeach pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git
commit 4c05b1cba0332347affa4596364d8e153bef32b7
Author: James Peach <jp...@apache.org>
AuthorDate: Wed Apr 27 12:00:34 2016 -0700
TSHttpTxnParentProxySet should take const arguments.
---
doc/developer-guide/api/functions/TSHttpTxnParentProxySet.en.rst | 2 +-
proxy/InkAPI.cc | 4 ++--
proxy/InkAPITest.cc | 2 +-
proxy/api/ts/ts.h | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/doc/developer-guide/api/functions/TSHttpTxnParentProxySet.en.rst b/doc/developer-guide/api/functions/TSHttpTxnParentProxySet.en.rst
index daae59a..8da767d 100644
--- a/doc/developer-guide/api/functions/TSHttpTxnParentProxySet.en.rst
+++ b/doc/developer-guide/api/functions/TSHttpTxnParentProxySet.en.rst
@@ -28,7 +28,7 @@ Synopsis
`#include <ts/ts.h>`
-.. function:: void TSHttpTxnParentProxySet(TSHttpTxn txnp, char * hostname, int port)
+.. function:: void TSHttpTxnParentProxySet(TSHttpTxn txnp, const char * hostname, int port)
Description
===========
diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index 7e1ec07..110efc7 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -5545,7 +5545,7 @@ TSHttpTxnServerRequestBodySet(TSHttpTxn txnp, char *buf, int64_t buflength)
}
TSReturnCode
-TSHttpTxnParentProxyGet(TSHttpTxn txnp, char **hostname, int *port)
+TSHttpTxnParentProxyGet(TSHttpTxn txnp, const char **hostname, int *port)
{
sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
@@ -5558,7 +5558,7 @@ TSHttpTxnParentProxyGet(TSHttpTxn txnp, char **hostname, int *port)
}
void
-TSHttpTxnParentProxySet(TSHttpTxn txnp, char *hostname, int port)
+TSHttpTxnParentProxySet(TSHttpTxn txnp, const char *hostname, int port)
{
sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
sdk_assert(sdk_sanity_check_null_ptr((void *)hostname) == TS_SUCCESS);
diff --git a/proxy/InkAPITest.cc b/proxy/InkAPITest.cc
index 5a96287..cec0c35 100644
--- a/proxy/InkAPITest.cc
+++ b/proxy/InkAPITest.cc
@@ -5668,7 +5668,7 @@ checkHttpTxnParentProxy(ContData *data, TSHttpTxn txnp)
{
const char *hostname = "txnpp.example.com";
int port = 10180;
- char *hostnameget = NULL;
+ const char *hostnameget = NULL;
int portget = 0;
TSHttpTxnParentProxySet(txnp, (char *)hostname, port);
diff --git a/proxy/api/ts/ts.h b/proxy/api/ts/ts.h
index 1593784..a55408a 100644
--- a/proxy/api/ts/ts.h
+++ b/proxy/api/ts/ts.h
@@ -1455,7 +1455,7 @@ tsapi void TSHttpTxnErrorBodySet(TSHttpTxn txnp, char *buf, size_t buflength, ch
@param port parent proxy's port.
*/
-tsapi TSReturnCode TSHttpTxnParentProxyGet(TSHttpTxn txnp, char **hostname, int *port);
+tsapi TSReturnCode TSHttpTxnParentProxyGet(TSHttpTxn txnp, const char **hostname, int *port);
/**
Sets the parent proxy name and port. The string hostname is copied
@@ -1467,7 +1467,7 @@ tsapi TSReturnCode TSHttpTxnParentProxyGet(TSHttpTxn txnp, char **hostname, int
@param port parent proxy port to set.
*/
-tsapi void TSHttpTxnParentProxySet(TSHttpTxn txnp, char *hostname, int port);
+tsapi void TSHttpTxnParentProxySet(TSHttpTxn txnp, const char *hostname, int port);
tsapi void TSHttpTxnUntransformedRespCache(TSHttpTxn txnp, int on);
tsapi void TSHttpTxnTransformedRespCache(TSHttpTxn txnp, int on);
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.