BUG23240 use signed counters for recv_avail and don't increment

counters until message successfully sent to mbox
This commit is contained in:
kieranm
2009-07-09 09:35:07 +00:00
parent fb555a0633
commit 1eee0be951
4 changed files with 38 additions and 18 deletions

View File

@@ -137,7 +137,7 @@ struct netconn {
/** maximum amount of bytes queued in recvmbox */
int recv_bufsize;
#endif /* LWIP_SO_RCVBUF */
u16_t recv_avail;
s16_t recv_avail;
#if LWIP_TCP
/** TCP: when data passed to netconn_write doesn't fit into the send buffer,
this temporarily stores the message. */