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

lws_reset_header_table dont reset NULL

This is only a temporary, fragile solution.

https://github.com/warmcat/libwebsockets/issues/416

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2016-02-09 09:15:02 +08:00
parent 083c73e7e9
commit 892f03a7d8

View file

@ -63,6 +63,9 @@ lextable_decode(int pos, char c)
void
lws_reset_header_table(struct lws *wsi)
{
if (!wsi->u.hdr.ah)
return;
/* init the ah to reflect no headers or data have appeared yet */
memset(wsi->u.hdr.ah->frag_index, 0, sizeof(wsi->u.hdr.ah->frag_index));
wsi->u.hdr.ah->nfrag = 0;