| 34 | static DbgCtl plugin_ctl{PLUGIN_TAG}; |
| 35 | |
| 36 | static int |
| 37 | tunnelStart(TSCont /* cont ATS_UNUSED */, TSEvent event, void *edata) |
| 38 | { |
| 39 | TSHttpTxn txnp = reinterpret_cast<TSHttpTxn>(edata); |
| 40 | TSTxnType retval = TSHttpTxnTypeGet(txnp); |
| 41 | Dbg(plugin_ctl, "tunnelStart event=%d type=%d", event, retval); |
| 42 | |
| 43 | TSStatIntIncrement(stat_tunnel_start, 1); |
| 44 | if (retval != TS_TXN_TYPE_EXPLICIT_TUNNEL || event != TS_EVENT_HTTP_TUNNEL_START) { |
| 45 | TSStatIntIncrement(stat_error, 1); |
| 46 | Dbg(plugin_ctl, "tunnelStart unexpected type"); |
| 47 | TSHttpTxnReenable(txnp, TS_EVENT_HTTP_ERROR); |
| 48 | return TS_SUCCESS; |
| 49 | } |
| 50 | TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE); |
| 51 | return TS_SUCCESS; |
| 52 | } |
| 53 | |
| 54 | static int |
| 55 | transactionStart(TSCont /* cont ATS_UNUSED */, TSEvent event, void *edata) |
nothing calls this directly
no test coverage detected