From bb10f3d3a574a32b1a0d40ffaab4ea2d978e4231 Mon Sep 17 00:00:00 2001 From: RichardBarry Date: Fri, 24 Aug 2007 15:35:09 +0000 Subject: [PATCH] Fixed bugs as listed to date in the tracker for the SourceForge project. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@107 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Demo/Common/ethernet/uIP/uip-1.0/uip/uip.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Demo/Common/ethernet/uIP/uip-1.0/uip/uip.c b/Demo/Common/ethernet/uIP/uip-1.0/uip/uip.c index fd0b2ced1..e5854e994 100644 --- a/Demo/Common/ethernet/uIP/uip-1.0/uip/uip.c +++ b/Demo/Common/ethernet/uIP/uip-1.0/uip/uip.c @@ -742,7 +742,8 @@ uip_process(u8_t flag) connection's timer and see if it has reached the RTO value in which case we retransmit. */ if(uip_outstanding(uip_connr)) { - if(uip_connr->timer-- == 0) { + uip_connr->timer = uip_connr->timer - 1; + if(uip_connr->timer == 0) { if(uip_connr->nrtx == UIP_MAXRTX || ((uip_connr->tcpstateflags == UIP_SYN_SENT || uip_connr->tcpstateflags == UIP_SYN_RCVD) && @@ -1128,6 +1129,7 @@ uip_process(u8_t flag) goto drop; udp_found: + UIP_STAT(++uip_stat.udp.recv); uip_conn = NULL; uip_flags = UIP_NEWDATA; uip_sappdata = uip_appdata = &uip_buf[UIP_LLH_LEN + UIP_IPUDPH_LEN]; @@ -1161,7 +1163,7 @@ uip_process(u8_t flag) uip_ipaddr_copy(BUF->srcipaddr, uip_hostaddr); uip_ipaddr_copy(BUF->destipaddr, uip_udp_conn->ripaddr); - uip_appdata = &uip_buf[UIP_LLH_LEN + UIP_IPTCPH_LEN]; + uip_appdata = &uip_buf[UIP_LLH_LEN + UIP_IPUDPH_LEN]; #if UIP_UDP_CHECKSUMS /* Calculate UDP checksum. */ @@ -1170,7 +1172,7 @@ uip_process(u8_t flag) UDPBUF->udpchksum = 0xffff; } #endif /* UIP_UDP_CHECKSUMS */ - + UIP_STAT(++uip_stat.udp.sent); goto ip_send_nolen; #endif /* UIP_UDP */ -- 2.39.5