1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

h2: make has_buffered_out check nwsi

This commit is contained in:
Andy Green 2021-09-13 15:10:42 +01:00
parent d075d4f9ca
commit 005e130393
2 changed files with 20 additions and 2 deletions

View file

@ -1117,8 +1117,8 @@ lws_rxflow_cache(struct lws *wsi, unsigned char *buf, size_t n, size_t len);
int
lws_service_flag_pending(struct lws_context *context, int tsi);
static LWS_INLINE int
lws_has_buffered_out(struct lws *wsi) { return !!wsi->buflist_out; }
int
lws_has_buffered_out(struct lws *wsi);
int LWS_WARN_UNUSED_RESULT
lws_ws_client_rx_sm(struct lws *wsi, unsigned char c);

View file

@ -622,6 +622,24 @@ lws_get_ssl(struct lws *wsi)
}
#endif
int
lws_has_buffered_out(struct lws *wsi)
{
if (wsi->buflist_out)
return 1;
#if defined(LWS_ROLE_H2)
{
struct lws *nwsi = lws_get_network_wsi(wsi);
if (nwsi->buflist_out)
return 1;
}
#endif
return 0;
}
int
lws_partial_buffered(struct lws *wsi)
{