summaryrefslogtreecommitdiff
path: root/src/mod_wstunnel.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2020-01-11 00:54:31 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2020-07-08 19:54:29 -0400
commit31d9495330fe6242738cdc873a71153dcb03939a (patch)
tree53873e16b998747723f4c7c59e49108dcabab19b /src/mod_wstunnel.c
parenteea7cd3c2f576d1cff6850fa208adc5ee00468e5 (diff)
downloadlighttpd-git-31d9495330fe6242738cdc873a71153dcb03939a.tar.gz
[core] store subrequest_handler instead of mode
store pointer to module in handler_module instead of con->mode id
Diffstat (limited to 'src/mod_wstunnel.c')
-rw-r--r--src/mod_wstunnel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mod_wstunnel.c b/src/mod_wstunnel.c
index b1ac1105..bdc53efa 100644
--- a/src/mod_wstunnel.c
+++ b/src/mod_wstunnel.c
@@ -558,7 +558,7 @@ static handler_t mod_wstunnel_check_extension(connection *con, void *p_d) {
const buffer *vb;
handler_t rc;
- if (con->mode != DIRECT)
+ if (NULL != con->response.handler_module)
return HANDLER_GO_ON;
if (con->request.http_method != HTTP_METHOD_GET)
return HANDLER_GO_ON;
@@ -582,7 +582,7 @@ static handler_t mod_wstunnel_check_extension(connection *con, void *p_d) {
if (NULL == p->conf.gw.exts) return HANDLER_GO_ON;
rc = gw_check_extension(con, (gw_plugin_data *)p, 1, sizeof(handler_ctx));
- return (HANDLER_GO_ON == rc && con->mode == p->id)
+ return (HANDLER_GO_ON == rc && con->response.handler_module == p->self)
? wstunnel_handler_setup(con, p)
: rc;
}
@@ -596,7 +596,7 @@ TRIGGER_FUNC(mod_wstunnel_handle_trigger) {
for (uint32_t i = 0; i < srv->conns.used; ++i) {
connection *con = srv->conns.ptr[i];
handler_ctx *hctx = con->request.plugin_ctx[p->id];
- if (NULL == hctx || con->mode != p->id)
+ if (NULL == hctx || con->response.handler_module != p->self)
continue;
if (hctx->gw.state != GW_STATE_WRITE && hctx->gw.state != GW_STATE_READ)