mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-27 02:26:55 +08:00
Allow minimal unix target to build in cygwin (but not necessarily run).
Applied a patch from Marc Boucher which has the following changes: 1) Fixed sys_arch.txt documentation to have new return type from sys_thread_new. 2) Removed unnecessary casts on calling sys_timeout() in certain files. 3) Removed some unnecessary break statements after return statements. 4) Changed sys_timeout_remove() to sys_untimeout(). 5) Added some forgotten #ifndef SYS_LIGHTWEIGHT_PROT to memp.c 6) Changed LWIP_DIAG and LWIP_PLATFORM_ASSERT to have do while().
This commit is contained in:
@@ -108,7 +108,6 @@ ip_lookup(void *header, struct netif *inp)
|
||||
#if LWIP_UDP > 0
|
||||
case IP_PROTO_UDP:
|
||||
return udp_lookup(iphdr, inp);
|
||||
break;
|
||||
#endif /* LWIP_UDP */
|
||||
#if LWIP_TCP > 0
|
||||
case IP_PROTO_TCP:
|
||||
@@ -116,7 +115,6 @@ ip_lookup(void *header, struct netif *inp)
|
||||
#endif /* LWIP_TCP */
|
||||
case IP_PROTO_ICMP:
|
||||
return 1;
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ ip_reass_timer(void *arg)
|
||||
{
|
||||
if(ip_reasstmr > 1) {
|
||||
ip_reasstmr--;
|
||||
sys_timeout(IP_REASS_TMO, (sys_timeout_handler) ip_reass_timer, NULL);
|
||||
sys_timeout(IP_REASS_TMO, ip_reass_timer, NULL);
|
||||
} else if(ip_reasstmr == 1)
|
||||
ip_reasstmr = 0;
|
||||
}
|
||||
@@ -121,7 +121,7 @@ ip_reass(struct pbuf *p)
|
||||
DEBUGF(IP_REASS_DEBUG, ("ip_reass: new packet\n"));
|
||||
memcpy(iphdr, fraghdr, IP_HLEN);
|
||||
ip_reasstmr = IP_REASS_MAXAGE;
|
||||
sys_timeout(IP_REASS_TMO, (sys_timeout_handler) ip_reass_timer, NULL);
|
||||
sys_timeout(IP_REASS_TMO, ip_reass_timer, NULL);
|
||||
ip_reassflags = 0;
|
||||
/* Clear the bitmap. */
|
||||
memset(ip_reassbitmap, 0, sizeof(ip_reassbitmap));
|
||||
@@ -148,7 +148,7 @@ ip_reass(struct pbuf *p)
|
||||
DEBUGF(IP_REASS_DEBUG,
|
||||
("ip_reass: fragment outside of buffer (%d:%d/%d).\n", offset,
|
||||
offset + len, IP_REASS_BUFSIZE));
|
||||
sys_timeout_remove((sys_timeout_handler) ip_reass_timer, NULL);
|
||||
sys_untimeout(ip_reass_timer, NULL);
|
||||
ip_reasstmr = 0;
|
||||
goto nullreturn;
|
||||
}
|
||||
@@ -236,7 +236,7 @@ ip_reass(struct pbuf *p)
|
||||
/* If we have come this far, we have a full packet in the
|
||||
buffer, so we allocate a pbuf and copy the packet into it. We
|
||||
also reset the timer. */
|
||||
sys_timeout_remove((sys_timeout_handler) ip_reass_timer, NULL);
|
||||
sys_untimeout(ip_reass_timer, NULL);
|
||||
ip_reasstmr = 0;
|
||||
pbuf_free(p);
|
||||
p = pbuf_alloc(PBUF_LINK, ip_reasslen, PBUF_POOL);
|
||||
|
||||
Reference in New Issue
Block a user