Fix an error the TCP/IP received sequence number counting

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4416 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo
2012-02-23 15:53:27 +00:00
parent 0362fd4c22
commit 112e4f55ba
6 changed files with 108 additions and 69 deletions
+14 -10
View File
@@ -183,11 +183,15 @@ static inline void recvfrom_newtcpdata(FAR struct uip_driver_s *dev,
nsaved = uip_datahandler(conn, buffer, buflen);
/* There are complicated buffering issues that are not addressed
* properly here. For example, what if up_datahandler() cannot buffer
* the remainder of the packet? In that case, the data will be dropped
* but still ACKed. Therefore it will not be resent. Fixing this could be
* tricky.
/* There are complicated buffering issues that are not addressed fully
* here. For example, what if up_datahandler() cannot buffer the
* remainder of the packet? In that case, the data will be dropped but
* still ACKed. Therefore it would not be resent.
*
* This is probably not an issue here because we only get here if the
* read-ahead buffers are empty and there would have to be something
* serioulsy wrong with the configuration not to be able to buffer a
* partial packet in this context.
*/
#ifdef CONFIG_DEBUG_NET
@@ -469,7 +473,9 @@ static uint16_t recvfrom_tcpinterrupt(struct uip_driver_s *dev, void *conn,
if ((flags & UIP_NEWDATA) != 0)
{
/* Copy the data from the packet */
/* Copy the data from the packet (saving any unused bytes from the
* packet in the read-ahead buffer).
*/
recvfrom_newtcpdata(dev, pstate);
@@ -489,10 +495,8 @@ static uint16_t recvfrom_tcpinterrupt(struct uip_driver_s *dev, void *conn,
{
nllvdbg("TCP resume\n");
/* The TCP receive buffer is full. Return now, perhaps truncating
* the received data (need to fix that).
*
* Don't allow any further TCP call backs.
/* The TCP receive buffer is full. Return now and don't allow
* any further TCP call backs.
*/
pstate->rf_cb->flags = 0;