Browse Source

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

STABLE-2_1_x
sg 11 years ago
parent
commit
204bd29e52
  1. 3
      CHANGELOG
  2. 4
      src/api/sockets.c

3
CHANGELOG

@ -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

4
src/api/sockets.c

@ -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);
}

Loading…
Cancel
Save