ah move more_rx_waiting to wsi scope
authorAndy Green <andy.green@linaro.org>
Sun, 28 Feb 2016 02:55:31 +0000 (10:55 +0800)
committerAndy Green <andy.green@linaro.org>
Mon, 29 Feb 2016 02:34:58 +0000 (10:34 +0800)
commit83af28a74771118669441d11178f32d84e057ce5
tree89e40780940d50ee37b2b09b2ba74afab109e794
parent03384721e7f330c0eea9ca3f1c4eaac8a511ab8c
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