mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-05 14:04:38 +08:00
tcp_out: Use LWIP_DBG_LEVEL_SERIOUS instead of hard coded number
Trivial clean up to avoid using hard coded number. Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
parent
44256740bd
commit
9f3aab6a62
@ -321,7 +321,7 @@ tcp_write_checks(struct tcp_pcb *pcb, u16_t len)
|
|||||||
|
|
||||||
/* fail on too much data */
|
/* fail on too much data */
|
||||||
if (len > pcb->snd_buf) {
|
if (len > pcb->snd_buf) {
|
||||||
LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 3, ("tcp_write: too much data (len=%"U16_F" > snd_buf=%"TCPWNDSIZE_F")\n",
|
LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("tcp_write: too much data (len=%"U16_F" > snd_buf=%"TCPWNDSIZE_F")\n",
|
||||||
len, pcb->snd_buf));
|
len, pcb->snd_buf));
|
||||||
pcb->flags |= TF_NAGLEMEMERR;
|
pcb->flags |= TF_NAGLEMEMERR;
|
||||||
return ERR_MEM;
|
return ERR_MEM;
|
||||||
@ -333,7 +333,7 @@ tcp_write_checks(struct tcp_pcb *pcb, u16_t len)
|
|||||||
* configured maximum, return an error */
|
* configured maximum, return an error */
|
||||||
/* check for configured max queuelen and possible overflow */
|
/* check for configured max queuelen and possible overflow */
|
||||||
if ((pcb->snd_queuelen >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) {
|
if ((pcb->snd_queuelen >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) {
|
||||||
LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 3, ("tcp_write: too long queue %"U16_F" (max %"U16_F")\n",
|
LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("tcp_write: too long queue %"U16_F" (max %"U16_F")\n",
|
||||||
pcb->snd_queuelen, TCP_SND_QUEUELEN));
|
pcb->snd_queuelen, TCP_SND_QUEUELEN));
|
||||||
TCP_STATS_INC(tcp.memerr);
|
TCP_STATS_INC(tcp.memerr);
|
||||||
pcb->flags |= TF_NAGLEMEMERR;
|
pcb->flags |= TF_NAGLEMEMERR;
|
||||||
@ -764,7 +764,7 @@ tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags)
|
|||||||
/* check for configured max queuelen and possible overflow (FIN flag should always come through!) */
|
/* check for configured max queuelen and possible overflow (FIN flag should always come through!) */
|
||||||
if (((pcb->snd_queuelen >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) &&
|
if (((pcb->snd_queuelen >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) &&
|
||||||
((flags & TCP_FIN) == 0)) {
|
((flags & TCP_FIN) == 0)) {
|
||||||
LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 3, ("tcp_enqueue_flags: too long queue %"U16_F" (max %"U16_F")\n",
|
LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("tcp_enqueue_flags: too long queue %"U16_F" (max %"U16_F")\n",
|
||||||
pcb->snd_queuelen, TCP_SND_QUEUELEN));
|
pcb->snd_queuelen, TCP_SND_QUEUELEN));
|
||||||
TCP_STATS_INC(tcp.memerr);
|
TCP_STATS_INC(tcp.memerr);
|
||||||
pcb->flags |= TF_NAGLEMEMERR;
|
pcb->flags |= TF_NAGLEMEMERR;
|
||||||
@ -795,7 +795,7 @@ tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags)
|
|||||||
* This means we can't send FIN while snd_buf==0. A better fix would be to
|
* This means we can't send FIN while snd_buf==0. A better fix would be to
|
||||||
* not include SYN and FIN sequence numbers in the snd_buf count. */
|
* not include SYN and FIN sequence numbers in the snd_buf count. */
|
||||||
if (pcb->snd_buf == 0) {
|
if (pcb->snd_buf == 0) {
|
||||||
LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 3, ("tcp_enqueue_flags: no send buffer available\n"));
|
LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("tcp_enqueue_flags: no send buffer available\n"));
|
||||||
TCP_STATS_INC(tcp.memerr);
|
TCP_STATS_INC(tcp.memerr);
|
||||||
return ERR_MEM;
|
return ERR_MEM;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user