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

Function globalHandler

tests/tools/plugins/hook_add_plugin.cc:106–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106int
107globalHandler(TSCont /* continuation ATS_UNUSED */, TSEvent event, void *data)
108{
109 if (event == TS_EVENT_HTTP_SSN_START) {
110 TSHttpSsn session = static_cast<TSHttpSsn>(data);
111 Dbg(dbg_ctl, " -- globalHandler :: TS_EVENT_HTTP_SSN_START");
112 TSCont cont = TSContCreate(sessionHandler, TSMutexCreate());
113
114 TSHttpSsnHookAdd(session, TS_HTTP_PRE_REMAP_HOOK, cont);
115 TSHttpSsnHookAdd(session, TS_HTTP_SSN_CLOSE_HOOK, cont);
116
117 Dbg(dbg_ctl, "New session, cont is %p", cont);
118
119 if (DelayStart == 0) {
120 TSHttpSsnReenable(session, TS_EVENT_HTTP_CONTINUE);
121 } else {
122 TSContDataSet(cont, session);
123 TSContScheduleOnPool(cont, 500, TS_THREAD_POOL_TASK);
124 }
125 }
126
127 return 0;
128}
129
130void
131TSPluginInit(int argc, const char **argv)

Callers

nothing calls this directly

Calls 6

TSContCreateFunction · 0.85
TSMutexCreateFunction · 0.85
TSHttpSsnHookAddFunction · 0.85
TSHttpSsnReenableFunction · 0.85
TSContDataSetFunction · 0.85
TSContScheduleOnPoolFunction · 0.85

Tested by

no test coverage detected