| 104 | } |
| 105 | |
| 106 | int |
| 107 | globalHandler(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 | |
| 130 | void |
| 131 | TSPluginInit(int argc, const char **argv) |
nothing calls this directly
no test coverage detected