mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
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.
This commit is contained in:
parent
61cc61817e
commit
5106e9141f
1 changed files with 2 additions and 2 deletions
|
@ -490,7 +490,7 @@ lws_create_vhost(struct lws_context *context,
|
|||
* for a protocol get it enabled.
|
||||
*/
|
||||
|
||||
if (info->options & LWS_SERVER_OPTION_EXPLICIT_VHOSTS)
|
||||
if (context->options & LWS_SERVER_OPTION_EXPLICIT_VHOSTS)
|
||||
f = 0;
|
||||
(void)f;
|
||||
#ifdef LWS_WITH_PLUGINS
|
||||
|
@ -520,7 +520,7 @@ lws_create_vhost(struct lws_context *context,
|
|||
#ifdef LWS_WITH_PLUGINS
|
||||
(context->plugin_list) ||
|
||||
#endif
|
||||
info->options & LWS_SERVER_OPTION_EXPLICIT_VHOSTS)
|
||||
context->options & LWS_SERVER_OPTION_EXPLICIT_VHOSTS)
|
||||
vh->protocols = lwsp;
|
||||
else {
|
||||
vh->protocols = info->protocols;
|
||||
|
|
Loading…
Add table
Reference in a new issue