recv() may not return all data
authorPavel Borzenkov <pavel.borzenkov@auriga.com>
Fri, 15 Apr 2011 12:16:58 +0000 (13:16 +0100)
committerAndy Green <andy.green@linaro.org>
Fri, 15 Apr 2011 12:16:58 +0000 (13:16 +0100)
commit876534b0d5515543be72f2c92712ed841753a78f
tree5aeb1eed4b1c14c06a83d6bc6ce5a8cf79e92866
parent71ea500081a9693555cc0ec55e892d5333b07eb0
recv() may not return all data

While performing handshake recv() is called only once.
It may return only part of the data and handshake
will fail. This patch modifies libwebsocket_service_fd()
to ensure that there is not data left in the socket.

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@auriga.com>
lib/client-handshake.c
lib/libwebsockets.c