Fix broken MSG_PEEK on TCP sockets (post-2.0.3 bug)
MSG_PEEK on TCP sockets was broken since commit b71d4477ea
from 06.03.2017: recv hung in an endless loop and tcp_recved() was called for peeked data
(which would result in a too large window advertised).
Aded TCP MSG_PEEK to socket unit tests
This commit is contained in:
@@ -161,6 +161,12 @@ static void test_sockets_allfunctions_basic_domain(int domain)
|
||||
|
||||
while(tcpip_thread_poll_one());
|
||||
|
||||
ret = lwip_recv(s2, buf, 3, MSG_PEEK);
|
||||
fail_unless(ret == 3);
|
||||
|
||||
ret = lwip_recv(s2, buf, 3, MSG_PEEK);
|
||||
fail_unless(ret == 3);
|
||||
|
||||
ret = lwip_read(s2, buf, 4);
|
||||
fail_unless(ret == 4);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user