MCPcopy Create free account
hub / github.com/apache/trafficserver / TSHttpTxnHookAdd

Function TSHttpTxnHookAdd

src/api/InkAPI.cc:3846–3864  ·  view source on GitHub ↗

HTTP transactions */

Source from the content-addressed store, hash-verified

3844
3845/* HTTP transactions */
3846void
3847TSHttpTxnHookAdd(TSHttpTxn txnp, TSHttpHookID id, TSCont contp)
3848{
3849 sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
3850 sdk_assert(sdk_sanity_check_continuation(contp) == TS_SUCCESS);
3851 sdk_assert(sdk_sanity_check_hook_id(id) == TS_SUCCESS);
3852
3853 HttpSM *sm = reinterpret_cast<HttpSM *>(txnp);
3854 APIHook *hook = sm->txn_hook_get(id);
3855
3856 // Traverse list of hooks and add a particular hook only once
3857 while (hook != nullptr) {
3858 if (hook->m_cont == reinterpret_cast<INKContInternal *>(contp)) {
3859 return;
3860 }
3861 hook = hook->m_link.next;
3862 }
3863 sm->txn_hook_add(id, reinterpret_cast<INKContInternal *>(contp));
3864}
3865
3866TSHttpSsn
3867TSHttpTxnSsnGet(TSHttpTxn txnp)

Callers 15

handle_dnsFunction · 0.85
server_push_pluginFunction · 0.85
handle_client_lookupFunction · 0.85
transform_addFunction · 0.85
main_hookFunction · 0.85
global_pluginFunction · 0.85
transform_pluginFunction · 0.85
transform_addFunction · 0.85
handle_dnsFunction · 0.85
transform_addFunction · 0.85
handle_dnsFunction · 0.85
handle_txn_startFunction · 0.85

Calls 5

sdk_sanity_check_txnFunction · 0.85
sdk_sanity_check_hook_idFunction · 0.85
txn_hook_getMethod · 0.80
txn_hook_addMethod · 0.80

Tested by 7

ssn_handlerFunction · 0.68
parent_proxy_handlerFunction · 0.68
transform_addFunction · 0.68
transform_hook_handlerFunction · 0.68
sessionContFuncFunction · 0.68
setup_callbacksFunction · 0.68
globalContFuncFunction · 0.68