patches 1492, 1493 and 1494 from Marc

This commit is contained in:
jani
2003-05-19 14:41:54 +00:00
parent cda867d52b
commit cd65d36822
7 changed files with 23 additions and 22 deletions

View File

@@ -237,7 +237,7 @@ ip_input(struct pbuf *p, struct netif *inp) {
/* send ICMP destination protocol unreachable */
icmp_dest_unreach(p, ICMP_DUR_PROTO);
pbuf_free(p);
DEBUGF(IP_DEBUG, ("Unsupported transportation protocol %u\n",
DEBUGF(IP_DEBUG, ("Unsupported transport protocol %u\n",
iphdr->nexthdr));
#ifdef IP_STATS

View File

@@ -64,12 +64,12 @@ sys_mbox_fetch(sys_mbox_t mbox, void **msg)
if (timeouts->next->time > 0) {
time = sys_arch_mbox_fetch(mbox, msg, timeouts->next->time);
} else {
time = 0xffffffff;
time = SYS_ARCH_TIMEOUT;
}
if (time == 0xffffffff) {
/* If time == 0xffffffff, a timeout occured before a message could be
fetched. We should now call the timeout handler and
if (time == SYS_ARCH_TIMEOUT) {
/* If time == SYS_ARCH_TIMEOUT, a timeout occured before a message
could be fetched. We should now call the timeout handler and
deallocate the memory allocated for the timeout. */
tmptimeout = timeouts->next;
timeouts->next = tmptimeout->next;
@@ -84,7 +84,7 @@ sys_mbox_fetch(sys_mbox_t mbox, void **msg)
/* We try again to fetch a message from the mbox. */
goto again;
} else {
/* If time != 0xffffffff, a message was received before the timeout
/* If time != SYS_ARCH_TIMEOUT, a message was received before the timeout
occured. The time variable is set to the number of
milliseconds we waited for the message. */
if (time <= timeouts->next->time) {
@@ -119,12 +119,12 @@ sys_sem_wait(sys_sem_t sem)
if (timeouts->next->time > 0) {
time = sys_arch_sem_wait(sem, timeouts->next->time);
} else {
time = 0xffffffff;
time = SYS_ARCH_TIMEOUT;
}
if (time == 0xffffffff) {
/* If time == 0xffffffff, a timeout occured before a message could be
fetched. We should now call the timeout handler and
if (time == SYS_ARCH_TIMEOUT) {
/* If time == SYS_ARCH_TIMEOUT, a timeout occured before a message
could be fetched. We should now call the timeout handler and
deallocate the memory allocated for the timeout. */
tmptimeout = timeouts->next;
timeouts->next = tmptimeout->next;
@@ -140,7 +140,7 @@ sys_sem_wait(sys_sem_t sem)
/* We try again to fetch a message from the mbox. */
goto again;
} else {
/* If time != 0xffffffff, a message was received before the timeout
/* If time != SYS_ARCH_TIMEOUT, a message was received before the timeout
occured. The time variable is set to the number of
milliseconds we waited for the message. */
if (time <= timeouts->next->time) {

View File

@@ -70,7 +70,7 @@ struct tcp_pcb *tcp_tw_pcbs; /* List of all TCP PCBs in TIME-WAIT. */
struct tcp_pcb *tcp_tmp_pcb;
#define MIN(x,y) (x) < (y)? (x): (y)
#define LWIP_MIN(x,y) (x) < (y)? (x): (y)
static u8_t tcp_timer;
@@ -506,7 +506,7 @@ tcp_slowtmr(void)
}
tcp_rexmit(pcb);
/* Reduce congestion window and ssthresh. */
eff_wnd = MIN(pcb->cwnd, pcb->snd_wnd);
eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd);
pcb->ssthresh = eff_wnd >> 1;
if (pcb->ssthresh < pcb->mss) {
pcb->ssthresh = pcb->mss * 2;

View File

@@ -59,7 +59,7 @@
#include "lwip/stats.h"
#if LWIP_TCP
#define MIN(x,y) (x) < (y)? (x): (y)
#define LWIP_MIN(x,y) (x) < (y)? (x): (y)
@@ -367,7 +367,7 @@ tcp_output(struct tcp_pcb *pcb)
return ERR_OK;
}
wnd = MIN(pcb->snd_wnd, pcb->cwnd);
wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd);
seg = pcb->unsent;