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 23:30:40 UTC
[trafficserver] branch 7.1.x updated (684629f -> f40cbb2)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a change to branch 7.1.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git.
from 684629f Doc: Updates to prevent dangling references.
new 5d1344e Modify TSHttpTxnHookAdd to add hook only once
new f40cbb2 [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 7.1.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git
commit f40cbb2a7d737a94e4b2847511ae38cbf6f831d0
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
(cherry picked from commit 78bd265e1b02c4b51bc6edafa11df3006ab92c94)
---
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 7.1.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git
commit 5d1344ee7c928cbd3815a4fd73ba651dd2cc1ee6
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
(cherry picked from commit 6e6607a2d4a1d792f402e6012a1cf816f1e34657)
---
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>.