fixed bug #45827: recvfrom: TCP window is updated with MSG_PEEK

This commit is contained in:
sg 2015-08-25 22:25:51 +02:00
parent fd8b37dc14
commit 204bd29e52
2 changed files with 6 additions and 1 deletions

View File

@ -249,6 +249,9 @@ HISTORY
++ Bugfixes:
2015-08-25: Simon Goldschmidt
* sockets.c: fixed bug #45827: recvfrom: TCP window is updated with MSG_PEEK
2015-08-20: Manoj Kumar
* snmp_msg.h, msg_in.c: fixed bug #43790: Sending octet string of Length >255
from SNMP agent

View File

@ -907,11 +907,13 @@ lwip_recvfrom(int s, void *mem, size_t len, int flags,
} else {
netbuf_delete((struct netbuf *)buf);
}
buf = NULL;
}
}
} while (!done);
if ((off > 0) && (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP)) {
if ((off > 0) && (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) &&
((flags & MSG_PEEK) == 0)) {
/* update receive window */
netconn_recved(sock->conn, (u32_t)off);
}