Skip to content
Snippets Groups Projects
Commit 5106e914 authored by Andy Green's avatar Andy Green
Browse files

explicit vhosts: only check context for flag

Although the test apps reuse the context info directly and so inherit the
flag state there when creating vhosts, users might generate a fresh info
without the flag for vhost creation.  So just go by what was given at
context creation time.
parent 61cc6181
No related branches found
No related tags found
No related merge requests found
...@@ -490,7 +490,7 @@ lws_create_vhost(struct lws_context *context, ...@@ -490,7 +490,7 @@ lws_create_vhost(struct lws_context *context,
* for a protocol get it enabled. * for a protocol get it enabled.
*/ */
if (info->options & LWS_SERVER_OPTION_EXPLICIT_VHOSTS) if (context->options & LWS_SERVER_OPTION_EXPLICIT_VHOSTS)
f = 0; f = 0;
(void)f; (void)f;
#ifdef LWS_WITH_PLUGINS #ifdef LWS_WITH_PLUGINS
...@@ -520,7 +520,7 @@ lws_create_vhost(struct lws_context *context, ...@@ -520,7 +520,7 @@ lws_create_vhost(struct lws_context *context,
#ifdef LWS_WITH_PLUGINS #ifdef LWS_WITH_PLUGINS
(context->plugin_list) || (context->plugin_list) ||
#endif #endif
info->options & LWS_SERVER_OPTION_EXPLICIT_VHOSTS) context->options & LWS_SERVER_OPTION_EXPLICIT_VHOSTS)
vh->protocols = lwsp; vh->protocols = lwsp;
else { else {
vh->protocols = info->protocols; vh->protocols = info->protocols;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment