mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-22 16:16:55 +08:00
fixed bug #45827: recvfrom: TCP window is updated with MSG_PEEK
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user