mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
lws_set_wsi_user: allow setting if protocol pss size zero
This commit is contained in:
parent
a9b00f50ee
commit
9adc64114b
1 changed files with 4 additions and 1 deletions
|
@ -635,7 +635,10 @@ lws_wsi_user(struct lws *wsi)
|
|||
void
|
||||
lws_set_wsi_user(struct lws *wsi, void *data)
|
||||
{
|
||||
if (wsi->user_space_externally_allocated)
|
||||
/* client and user owns it... */
|
||||
if (wsi->user_space_externally_allocated ||
|
||||
/* server, and protocol can never own it, user can control it... */
|
||||
(wsi->protocol && !wsi->protocol->per_session_data_size))
|
||||
wsi->user_space = data;
|
||||
else
|
||||
lwsl_err("%s: Cannot set internally-allocated user_space\n",
|
||||
|
|
Loading…
Add table
Reference in a new issue