You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ki...@apache.org on 2017/11/14 23:28:47 UTC

[trafficserver] 03/05: Change function name

This is an automated email from the ASF dual-hosted git repository.

kichan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit d07b79ce49c86eaa03928455e04fc29bc27bc3dc
Author: Kit Chan <ki...@apache.org>
AuthorDate: Tue Sep 19 23:16:00 2017 -0700

    Change function name
---
 .../api/functions/{TSIpAddrParse.en.rst => TSIpStringToAddr.en.rst} | 6 +++---
 plugins/experimental/ts_lua/ts_lua_fetch.c                          | 4 ++--
 proxy/InkAPI.cc                                                     | 2 +-
 proxy/api/ts/experimental.h                                         | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/doc/developer-guide/api/functions/TSIpAddrParse.en.rst b/doc/developer-guide/api/functions/TSIpStringToAddr.en.rst
similarity index 92%
rename from doc/developer-guide/api/functions/TSIpAddrParse.en.rst
rename to doc/developer-guide/api/functions/TSIpStringToAddr.en.rst
index 204375f..8251a29 100644
--- a/doc/developer-guide/api/functions/TSIpAddrParse.en.rst
+++ b/doc/developer-guide/api/functions/TSIpStringToAddr.en.rst
@@ -18,15 +18,15 @@
 
 .. default-domain:: c
 
-TSIpAddrParse
-*************
+TSIpStringToAddr
+****************
 
 Synopsis
 ========
 
 `#include <ts/experimental.h>`
 
-.. function:: TSReturnCode TSIpAddrParse(const char * str, int str_len, sockaddr* addr)
+.. function:: TSReturnCode TSIpStringToAddr(const char * str, int str_len, sockaddr* addr)
 
 Description
 ===========
diff --git a/plugins/experimental/ts_lua/ts_lua_fetch.c b/plugins/experimental/ts_lua/ts_lua_fetch.c
index 7b2d6a4..337a451 100644
--- a/plugins/experimental/ts_lua/ts_lua_fetch.c
+++ b/plugins/experimental/ts_lua/ts_lua_fetch.c
@@ -255,9 +255,9 @@ ts_lua_fetch_one_item(lua_State *L, const char *url, size_t url_len, ts_lua_fetc
     if (lua_isstring(L, -1)) {
       addr = luaL_checklstring(L, -1, &addr_len);
 
-      if (TS_ERROR == TSIpAddrParse(addr, addr_len, &clientaddr)) {
+      if (TS_ERROR == TSIpStringToAddr(addr, addr_len, &clientaddr)) {
         TSError("[%s] Client ip parse failed! Using default.", TS_LUA_DEBUG_TAG);
-        if (TS_ERROR == TSIpAddrParse(TS_LUA_FETCH_CLIENT_ADDRPORT, TS_LUA_FETCH_CLIENT_ADDRPORT_LEN, &clientaddr)) {
+        if (TS_ERROR == TSIpStringToAddr(TS_LUA_FETCH_CLIENT_ADDRPORT, TS_LUA_FETCH_CLIENT_ADDRPORT_LEN, &clientaddr)) {
           TSError("[%s] Default client ip parse failed!", TS_LUA_DEBUG_TAG);
           return 0;
         }
diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index b4b911c..4d5057c 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -2430,7 +2430,7 @@ TSUrlPercentEncode(TSMBuffer bufp, TSMLoc obj, char *dst, size_t dst_size, size_
 
 // pton
 TSReturnCode
-TSIpAddrParse(const char *str, size_t str_len, sockaddr *addr)
+TSIpStringToAddr(const char *str, size_t str_len, sockaddr *addr)
 {
   sdk_assert(sdk_sanity_check_null_ptr((void *)str) == TS_SUCCESS);
 
diff --git a/proxy/api/ts/experimental.h b/proxy/api/ts/experimental.h
index dd19cbf..4949064 100644
--- a/proxy/api/ts/experimental.h
+++ b/proxy/api/ts/experimental.h
@@ -232,7 +232,7 @@ tsapi int TSHttpTxnLookingUpTypeGet(TSHttpTxn txnp);
 tsapi void TSHttpTxnServerPush(TSHttpTxn txnp, const char *url, int url_len);
 
 /* ip addr parsing */
-tsapi TSReturnCode TSIpAddrParse(const char *str, size_t str_len, struct sockaddr *addr);
+tsapi TSReturnCode TSIpStringtoAddr(const char *str, size_t str_len, struct sockaddr *addr);
 
 /**
    Attempt to attach the contp continuation to sockets that have already been

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.