mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Eliminate uip_outstanding()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3134 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* net/uip/uip_tcpinput.c
|
||||
* Handling incoming TCP input
|
||||
*
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2010 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Adapted for NuttX from logic in uIP which also has a BSD-like license:
|
||||
@@ -326,7 +326,7 @@ found:
|
||||
* retransmission timer.
|
||||
*/
|
||||
|
||||
if ((pbuf->flags & TCP_ACK) && uip_outstanding(conn))
|
||||
if ((pbuf->flags & TCP_ACK) != 0 && conn->len > 0)
|
||||
{
|
||||
uint32_t seqno;
|
||||
uint32_t ackno;
|
||||
@@ -533,7 +533,7 @@ found:
|
||||
|
||||
if (pbuf->flags & TCP_FIN && !(conn->tcpstateflags & UIP_STOPPED))
|
||||
{
|
||||
if (uip_outstanding(conn))
|
||||
if (conn->len > 0)
|
||||
{
|
||||
goto drop;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* net/uip/uip_tcptimer.c
|
||||
* Poll for the availability of TCP TX data
|
||||
*
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2010 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Adapted for NuttX from logic in uIP which also has a BSD-like license:
|
||||
@@ -133,7 +133,7 @@ void uip_tcptimer(struct uip_driver_s *dev, struct uip_conn *conn, int hsec)
|
||||
* retransmit.
|
||||
*/
|
||||
|
||||
if (uip_outstanding(conn))
|
||||
if (conn->len > 0)
|
||||
{
|
||||
/* The connection has outstanding data */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user