| 46 | namespace |
| 47 | { |
| 48 | static int |
| 49 | handleGlobalPluginEvents(TSCont cont, TSEvent event, void *edata) |
| 50 | { |
| 51 | GlobalPluginState *state = static_cast<GlobalPluginState *>(TSContDataGet(cont)); |
| 52 | |
| 53 | if (event == TS_EVENT_HTTP_SELECT_ALT) { |
| 54 | TSHttpAltInfo alt = static_cast<TSHttpAltInfo>(edata); |
| 55 | utils::internal::invokePluginForEvent(state->global_plugin_, alt, event); |
| 56 | return 0; |
| 57 | } |
| 58 | |
| 59 | TSHttpTxn txn = static_cast<TSHttpTxn>(edata); |
| 60 | if (state->ignore_internal_transactions_ && TSHttpTxnIsInternal(txn)) { |
| 61 | LOG_DEBUG("Ignoring event %d on internal transaction %p for global plugin %p", event, txn, state->global_plugin_); |
| 62 | TSHttpTxnReenable(txn, TS_EVENT_HTTP_CONTINUE); |
| 63 | } else { |
| 64 | LOG_DEBUG("Invoking global plugin %p for event %d on transaction %p", state->global_plugin_, event, txn); |
| 65 | utils::internal::invokePluginForEvent(state->global_plugin_, txn, event); |
| 66 | } |
| 67 | return 0; |
| 68 | } |
| 69 | |
| 70 | } /* anonymous namespace */ |
| 71 |
nothing calls this directly
no test coverage detected