You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2017/01/18 22:33:51 UTC
[trafficserver] branch master updated (ffab45c -> 78bd265)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a change to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git.
from ffab45c TS-4887: Fixes naming of this new API in the docs
new 6e6607a Modify TSHttpTxnHookAdd to add hook only once
new 78bd265 [TS-5024] Ran clang-format. Modify TSHttpTxnHookAdd to add hook only once.
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.
Summary of changes:
proxy/InkAPI.cc | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].
[trafficserver] 02/02: [TS-5024] Ran clang-format. Modify
TSHttpTxnHookAdd to add hook only once.
Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git
commit 78bd265e1b02c4b51bc6edafa11df3006ab92c94
Author: Meera Mosale Nataraja <me...@gmail.com>
AuthorDate: Wed Jan 18 14:01:21 2017 -0800
[TS-5024] Ran clang-format.
Modify TSHttpTxnHookAdd to add hook only once.
Change-Id: I737ca666cc05f2e2e2006cbef7f6b5a68b0eb71f
---
proxy/InkAPI.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index 79cf0c0..f7d2b61 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -4612,7 +4612,7 @@ TSHttpTxnHookAdd(TSHttpTxn txnp, TSHttpHookID id, TSCont contp)
sdk_assert(sdk_sanity_check_continuation(contp) == TS_SUCCESS);
sdk_assert(sdk_sanity_check_hook_id(id) == TS_SUCCESS);
- HttpSM *sm = (HttpSM *)txnp;
+ HttpSM *sm = (HttpSM *)txnp;
APIHook *hook = sm->txn_hook_get(id);
// Traverse list of hooks and add a particular hook only once
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.
[trafficserver] 01/02: Modify TSHttpTxnHookAdd to add hook only once
Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git
commit 6e6607a2d4a1d792f402e6012a1cf816f1e34657
Author: Meera Mosale Nataraja <me...@gmail.com>
AuthorDate: Tue Nov 1 13:32:56 2016 -0700
Modify TSHttpTxnHookAdd to add hook only once
Change-Id: I45c9cdbe305e8b3d186beafb87ab5f8c5b03b757
---
proxy/InkAPI.cc | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index 6cc2770..79cf0c0 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -4613,6 +4613,15 @@ TSHttpTxnHookAdd(TSHttpTxn txnp, TSHttpHookID id, TSCont contp)
sdk_assert(sdk_sanity_check_hook_id(id) == TS_SUCCESS);
HttpSM *sm = (HttpSM *)txnp;
+ APIHook *hook = sm->txn_hook_get(id);
+
+ // Traverse list of hooks and add a particular hook only once
+ while (hook != NULL) {
+ if (hook->m_cont == (INKContInternal *)contp) {
+ return;
+ }
+ hook = hook->m_link.next;
+ }
sm->txn_hook_append(id, (INKContInternal *)contp);
}
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.