pseudotcp: Fix pseudo_tcp_socket_recv() in state TCP_CLOSE_WAIT
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Wed, 24 Jun 2015 13:06:05 +0000 (14:06 +0100)
committerOlivier CrĂȘte <olivier.crete@collabora.com>
Fri, 3 Jun 2016 22:28:33 +0000 (18:28 -0400)
commita72a93e51dba5d239e0607380bb4799cf1b0caca
tree5bb94d94d26732dd6e5b5612a75c7ba278189a6f
parent02699917641922c9f1d337e3102f13a1ea1d83c4
pseudotcp: Fix pseudo_tcp_socket_recv() in state TCP_CLOSE_WAIT

Previously, pseudo_tcp_socket_recv() would start returning 0 (EOS) as
soon as a FIN segment was received from the peer, even if there was
unread data already in the receive buffer.

Instead, the unread data should all be accessible before
pseudo_tcp_socket_recv() starts returning 0.
agent/pseudotcp.c
tests/test-pseudotcp-fin.c