mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-12-10 08:46:40 +08:00
get rid of DEMO_DEBUG in core code
This commit is contained in:
parent
ee221f4a74
commit
981f006ecd
@ -80,7 +80,6 @@ icmp_input(struct pbuf *p, struct netif *inp)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ping\n"));
|
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ping\n"));
|
||||||
LWIP_DEBUGF(DEMO_DEBUG, ("Pong!\n"));
|
|
||||||
if (p->tot_len < sizeof(struct icmp_echo_hdr)) {
|
if (p->tot_len < sizeof(struct icmp_echo_hdr)) {
|
||||||
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: bad ICMP echo received\n"));
|
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: bad ICMP echo received\n"));
|
||||||
pbuf_free(p);
|
pbuf_free(p);
|
||||||
|
|||||||
@ -421,7 +421,7 @@ tcp_listen_input(struct tcp_pcb_listen *pcb)
|
|||||||
&(iphdr->dest), &(iphdr->src),
|
&(iphdr->dest), &(iphdr->src),
|
||||||
tcphdr->dest, tcphdr->src);
|
tcphdr->dest, tcphdr->src);
|
||||||
} else if (flags & TCP_SYN) {
|
} else if (flags & TCP_SYN) {
|
||||||
LWIP_DEBUGF(DEMO_DEBUG, ("TCP connection request %u -> %u.\n", tcphdr->src, tcphdr->dest));
|
LWIP_DEBUGF(TCP_DEBUG, ("TCP connection request %u -> %u.\n", tcphdr->src, tcphdr->dest));
|
||||||
npcb = tcp_alloc(pcb->prio);
|
npcb = tcp_alloc(pcb->prio);
|
||||||
/* If a new PCB could not be created (probably due to lack of memory),
|
/* If a new PCB could not be created (probably due to lack of memory),
|
||||||
we don't do anything, but rely on the sender will retransmit the
|
we don't do anything, but rely on the sender will retransmit the
|
||||||
@ -569,7 +569,7 @@ tcp_process(struct tcp_pcb *pcb)
|
|||||||
if (TCP_SEQ_LT(pcb->lastack, ackno) &&
|
if (TCP_SEQ_LT(pcb->lastack, ackno) &&
|
||||||
TCP_SEQ_LEQ(ackno, pcb->snd_nxt)) {
|
TCP_SEQ_LEQ(ackno, pcb->snd_nxt)) {
|
||||||
pcb->state = ESTABLISHED;
|
pcb->state = ESTABLISHED;
|
||||||
LWIP_DEBUGF(DEMO_DEBUG, ("TCP connection established %u -> %u.\n", inseg.tcphdr->src, inseg.tcphdr->dest));
|
LWIP_DEBUGF(TCP_DEBUG, ("TCP connection established %u -> %u.\n", inseg.tcphdr->src, inseg.tcphdr->dest));
|
||||||
#if LWIP_CALLBACK_API
|
#if LWIP_CALLBACK_API
|
||||||
LWIP_ASSERT("pcb->accept != NULL", pcb->accept != NULL);
|
LWIP_ASSERT("pcb->accept != NULL", pcb->accept != NULL);
|
||||||
#endif
|
#endif
|
||||||
@ -601,7 +601,7 @@ tcp_process(struct tcp_pcb *pcb)
|
|||||||
tcp_receive(pcb);
|
tcp_receive(pcb);
|
||||||
if (flags & TCP_FIN) {
|
if (flags & TCP_FIN) {
|
||||||
if (flags & TCP_ACK && ackno == pcb->snd_nxt) {
|
if (flags & TCP_ACK && ackno == pcb->snd_nxt) {
|
||||||
LWIP_DEBUGF(DEMO_DEBUG,
|
LWIP_DEBUGF(TCP_DEBUG,
|
||||||
("TCP connection closed %d -> %d.\n", inseg.tcphdr->src, inseg.tcphdr->dest));
|
("TCP connection closed %d -> %d.\n", inseg.tcphdr->src, inseg.tcphdr->dest));
|
||||||
tcp_ack_now(pcb);
|
tcp_ack_now(pcb);
|
||||||
tcp_pcb_purge(pcb);
|
tcp_pcb_purge(pcb);
|
||||||
@ -619,7 +619,7 @@ tcp_process(struct tcp_pcb *pcb)
|
|||||||
case FIN_WAIT_2:
|
case FIN_WAIT_2:
|
||||||
tcp_receive(pcb);
|
tcp_receive(pcb);
|
||||||
if (flags & TCP_FIN) {
|
if (flags & TCP_FIN) {
|
||||||
LWIP_DEBUGF(DEMO_DEBUG, ("TCP connection closed %u -> %u.\n", inseg.tcphdr->src, inseg.tcphdr->dest));
|
LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed %u -> %u.\n", inseg.tcphdr->src, inseg.tcphdr->dest));
|
||||||
tcp_ack_now(pcb);
|
tcp_ack_now(pcb);
|
||||||
tcp_pcb_purge(pcb);
|
tcp_pcb_purge(pcb);
|
||||||
TCP_RMV(&tcp_active_pcbs, pcb);
|
TCP_RMV(&tcp_active_pcbs, pcb);
|
||||||
@ -630,7 +630,7 @@ tcp_process(struct tcp_pcb *pcb)
|
|||||||
case CLOSING:
|
case CLOSING:
|
||||||
tcp_receive(pcb);
|
tcp_receive(pcb);
|
||||||
if (flags & TCP_ACK && ackno == pcb->snd_nxt) {
|
if (flags & TCP_ACK && ackno == pcb->snd_nxt) {
|
||||||
LWIP_DEBUGF(DEMO_DEBUG, ("TCP connection closed %u -> %u.\n", inseg.tcphdr->src, inseg.tcphdr->dest));
|
LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed %u -> %u.\n", inseg.tcphdr->src, inseg.tcphdr->dest));
|
||||||
tcp_ack_now(pcb);
|
tcp_ack_now(pcb);
|
||||||
tcp_pcb_purge(pcb);
|
tcp_pcb_purge(pcb);
|
||||||
TCP_RMV(&tcp_active_pcbs, pcb);
|
TCP_RMV(&tcp_active_pcbs, pcb);
|
||||||
@ -641,7 +641,7 @@ tcp_process(struct tcp_pcb *pcb)
|
|||||||
case LAST_ACK:
|
case LAST_ACK:
|
||||||
tcp_receive(pcb);
|
tcp_receive(pcb);
|
||||||
if (flags & TCP_ACK && ackno == pcb->snd_nxt) {
|
if (flags & TCP_ACK && ackno == pcb->snd_nxt) {
|
||||||
LWIP_DEBUGF(DEMO_DEBUG, ("TCP connection closed %u -> %u.\n", inseg.tcphdr->src, inseg.tcphdr->dest));
|
LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed %u -> %u.\n", inseg.tcphdr->src, inseg.tcphdr->dest));
|
||||||
pcb->state = CLOSED;
|
pcb->state = CLOSED;
|
||||||
recv_flags = TF_CLOSED;
|
recv_flags = TF_CLOSED;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -502,10 +502,6 @@ a lot of data that needs to be copied, this should be set high. */
|
|||||||
#define DBG_TYPES_ON 0
|
#define DBG_TYPES_ON 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef DEMO_DEBUG
|
|
||||||
#define DEMO_DEBUG DBG_OFF
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef ETHARP_DEBUG
|
#ifndef ETHARP_DEBUG
|
||||||
#define ETHARP_DEBUG DBG_OFF
|
#define ETHARP_DEBUG DBG_OFF
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user