mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
raw-proxy: fix role bind flag
This commit is contained in:
parent
ee510154a0
commit
46c84eec06
2 changed files with 6 additions and 0 deletions
|
@ -156,6 +156,9 @@ lws_role_call_adoption_bind(struct lws *wsi, int type, const char *prot)
|
||||||
lwsl_wsi_err(wsi, "can't find role '%s'",
|
lwsl_wsi_err(wsi, "can't find role '%s'",
|
||||||
wsi->a.vhost->listen_accept_role);
|
wsi->a.vhost->listen_accept_role);
|
||||||
|
|
||||||
|
if (!strcmp(wsi->a.vhost->listen_accept_role, "raw-proxy"))
|
||||||
|
type |= LWS_ADOPT_FLAG_RAW_PROXY;
|
||||||
|
|
||||||
if (role && lws_rops_fidx(role, LWS_ROPS_adoption_bind)) {
|
if (role && lws_rops_fidx(role, LWS_ROPS_adoption_bind)) {
|
||||||
n = (lws_rops_func_fidx(role, LWS_ROPS_adoption_bind)).
|
n = (lws_rops_func_fidx(role, LWS_ROPS_adoption_bind)).
|
||||||
adoption_bind(wsi, type, prot);
|
adoption_bind(wsi, type, prot);
|
||||||
|
|
|
@ -48,6 +48,9 @@ rops_handle_POLLIN_raw_proxy(struct lws_context_per_thread *pt, struct lws *wsi,
|
||||||
return LWS_HPI_RET_HANDLED;
|
return LWS_HPI_RET_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (lwsi_state(wsi) == LRS_WAITING_CONNECT)
|
||||||
|
goto try_pollout;
|
||||||
|
|
||||||
if ((pollfd->revents & pollfd->events & LWS_POLLIN) &&
|
if ((pollfd->revents & pollfd->events & LWS_POLLIN) &&
|
||||||
/* any tunnel has to have been established... */
|
/* any tunnel has to have been established... */
|
||||||
lwsi_state(wsi) != LRS_SSL_ACK_PENDING &&
|
lwsi_state(wsi) != LRS_SSL_ACK_PENDING &&
|
||||||
|
|
Loading…
Add table
Reference in a new issue