diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-11-28 01:04:11 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-11-28 01:04:11 +0000 |
commit | 66a32df5155e7669fec3544366cf23becb47de83 (patch) | |
tree | 6356e525833ed9a9e06c5c5f470d26ad1ab8a926 /nuttx/net/send.c | |
parent | 9bd21d7b274c24ac45128b104b676be295e01877 (diff) | |
download | px4-nuttx-66a32df5155e7669fec3544366cf23becb47de83.tar.gz px4-nuttx-66a32df5155e7669fec3544366cf23becb47de83.tar.bz2 px4-nuttx-66a32df5155e7669fec3544366cf23becb47de83.zip |
Files needed to make LPC17xx EMAC RAM more configurable
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3141 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/net/send.c')
-rw-r--r-- | nuttx/net/send.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/nuttx/net/send.c b/nuttx/net/send.c index 515c350e4..14b9cea99 100644 --- a/nuttx/net/send.c +++ b/nuttx/net/send.c @@ -184,7 +184,6 @@ static uint16_t send_interrupt(struct uip_driver_s *dev, void *pvconn, * actually sent. */ - conn->unacked = 0; goto end_wait; } @@ -292,7 +291,7 @@ static uint16_t send_interrupt(struct uip_driver_s *dev, void *pvconn, } } - /* All data has been send and we are just waiting for ACK or re-tranmist + /* All data has been send and we are just waiting for ACK or re-transmit * indications to complete the send. Check for a timeout. */ @@ -301,8 +300,8 @@ static uint16_t send_interrupt(struct uip_driver_s *dev, void *pvconn, { /* Yes.. report the timeout */ - nllvdbg("TCP timeout\n"); - pstate->snd_sent = -EAGAIN; + nlldbg("SEND timeout\n"); + pstate->snd_sent = -ETIMEDOUT; goto end_wait; } #endif /* CONFIG_NET_SOCKOPTS && !CONFIG_DISABLE_CLOCK */ @@ -318,6 +317,10 @@ end_wait: pstate->snd_cb->priv = NULL; pstate->snd_cb->event = NULL; + /* There are no outstanding, unacknowledged bytes */ + + conn->unacked = 0; + /* Wake up the waiting thread */ sem_post(&pstate->snd_sem); @@ -447,6 +450,12 @@ ssize_t send(int sockfd, const void *buf, size_t len, int flags) state.snd_isn = uip_tcpgetsequence(conn->sndseq); + /* There is no outstanding, unacknowledged data after this + * initial sequence number. + */ + + conn->unacked = 0; + /* Update the initial time for calculating timeouts */ #if defined(CONFIG_NET_SOCKOPTS) && !defined(CONFIG_DISABLE_CLOCK) |