ah move more_rx_waiting to wsi scope
authorAndy Green <andy.green@linaro.org>
Sun, 28 Feb 2016 03:02:42 +0000 (11:02 +0800)
committerAndy Green <andy.green@linaro.org>
Sun, 28 Feb 2016 03:02:42 +0000 (11:02 +0800)
commit360c0a8ee4e30f80ebb7c2b3370caba231512e15
treec3d03c1da0640cefa6668499ec5374098d41aa7b
parente84120665314bb1437db5f573044593dbd8130da
ah move more_rx_waiting to wsi scope

Originally this was alright in wsi->u.hdr, because ah implied header
processing.  But since we allowed ah to be held across http
keep-alive transactions if we saw we had more header data, it means
we were trying to read this union member out of scope after it had
transitioned.

Moving the more_rx_waiting member to be a 1-bit bifield in the wsi
solves it and lets us check the state any time later at http
transaction completion.

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

Signed-off-by: Andy Green <andy.green@linaro.org>
changelog
lib/parsers.c
lib/private-libwebsockets.h
lib/server.c