Fixed bug #28853 (lwip_recvfrom() returns 0 on receive time-out or any netconn_recv() error)

This commit is contained in:
goldsimon 2010-02-09 18:46:54 +00:00
parent a84590273d
commit 1550c4215d
2 changed files with 5 additions and 1 deletions

View File

@ -103,6 +103,10 @@ HISTORY
++ Bugfixes:
2010-02-09: Simon Goldschmidt/Stephane Lesage
* sockets.c: Fixed bug #28853 (lwip_recvfrom() returns 0 on receive time-out
or any netconn_recv() error)
2010-02-09: Simon Goldschmidt
* ppp.c: task #10154 (PPP: Update snmp in/out counters for tx/rx packets)

View File

@ -544,7 +544,7 @@ lwip_recvfrom(int s, void *mem, size_t len, int flags,
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d): buf == NULL, error is \"%s\"!\n",
s, lwip_strerr(err)));
sock_set_errno(sock, err_to_errno(err));
return 0;
return -1;
}
LWIP_ASSERT("buf != NULL", buf != NULL);
sock->lastdata = buf;