websock: compatibility for LWS without plugins

This commit is contained in:
Roland Conybeare 2023-10-18 11:32:24 -04:00
commit f9f37a7a48

View file

@ -724,9 +724,13 @@ namespace xo {
*/
void init_cx_config(lws_context_creation_info * p_cx_config) {
::memset(p_cx_config, 0, sizeof(*p_cx_config));
p_cx_config->port = this->ws_config_.port();
p_cx_config->port = this->ws_config_.port();
p_cx_config->vhost_name = "localhost";
p_cx_config->pvo = &(this->pvo_);
#if defined(LWS_WITH_PLUGINS)
p_cx_config->pvo = &(this->pvo_);
#else
p_cx_config->pvo = nullptr;
#endif
p_cx_config->protocols = this->protocol_v_.data();
p_cx_config->mounts = &(this->mount_static_);
/* userdata -- accessible from context with lws_context_user() */