net/tcp/tcp_send_buffered.c: Fix syslog formats

This commit is contained in:
YAMAMOTO Takashi 2020-11-25 19:41:42 +09:00 committed by Xiang Xiao
parent 9125ebae37
commit 17654f592e

View File

@ -53,6 +53,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <inttypes.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
@ -400,7 +401,7 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
/* Get the ACK number from the TCP header */
ackno = tcp_getsequence(tcp->ackno);
ninfo("ACK: ackno=%u flags=%04x\n", ackno, flags);
ninfo("ACK: ackno=%" PRIu32 " flags=%04x\n", ackno, flags);
/* Look at every write buffer in the unacked_q. The unacked_q
* holds write buffers that have been entirely sent, but which
@ -426,7 +427,8 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
/* Get the sequence number at the end of the data */
lastseq = TCP_WBSEQNO(wrb) + TCP_WBPKTLEN(wrb);
ninfo("ACK: wrb=%p seqno=%u lastseq=%u pktlen=%u ackno=%u\n",
ninfo("ACK: wrb=%p seqno=%" PRIu32
" lastseq=%" PRIu32 " pktlen=%u ackno=%" PRIu32 "\n",
wrb, TCP_WBSEQNO(wrb), lastseq, TCP_WBPKTLEN(wrb),
ackno);
@ -478,8 +480,8 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
/* Set the new sequence number for what remains */
ninfo("ACK: wrb=%p seqno=%u pktlen=%u\n",
wrb, TCP_WBSEQNO(wrb), TCP_WBPKTLEN(wrb));
ninfo("ACK: wrb=%p seqno=%" PRIu32 " pktlen=%u\n",
wrb, TCP_WBSEQNO(wrb), TCP_WBPKTLEN(wrb));
}
}
}
@ -504,7 +506,8 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
nacked = TCP_WBSENT(wrb);
}
ninfo("ACK: wrb=%p seqno=%u nacked=%u sent=%u ackno=%u\n",
ninfo("ACK: wrb=%p seqno=%" PRIu32
" nacked=%" PRIu32 " sent=%u ackno=%" PRIu32 "\n",
wrb, TCP_WBSEQNO(wrb), nacked, TCP_WBSENT(wrb), ackno);
/* Trim the ACKed bytes from the beginning of the write buffer. */
@ -513,7 +516,7 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
TCP_WBSEQNO(wrb) = ackno;
TCP_WBSENT(wrb) -= nacked;
ninfo("ACK: wrb=%p seqno=%u pktlen=%u sent=%u\n",
ninfo("ACK: wrb=%p seqno=%" PRIu32 " pktlen=%u sent=%u\n",
wrb, TCP_WBSEQNO(wrb), TCP_WBPKTLEN(wrb), TCP_WBSENT(wrb));
}
}
@ -563,7 +566,8 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
}
TCP_WBSENT(wrb) = 0;
ninfo("REXMIT: wrb=%p sent=%u, conn tx_unacked=%d sent=%d\n",
ninfo("REXMIT: wrb=%p sent=%u, "
"conn tx_unacked=%" PRId32 " sent=%" PRId32 "\n",
wrb, TCP_WBSENT(wrb), conn->tx_unacked, conn->sent);
/* Increment the retransmit count on this write buffer. */
@ -635,7 +639,8 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
}
TCP_WBSENT(wrb) = 0;
ninfo("REXMIT: wrb=%p sent=%u, conn tx_unacked=%d sent=%d\n",
ninfo("REXMIT: wrb=%p sent=%u, "
"conn tx_unacked=%" PRId32 " sent=%" PRId32 "\n",
wrb, TCP_WBSENT(wrb), conn->tx_unacked, conn->sent);
/* Free any write buffers that have exceed the retry count */
@ -795,7 +800,7 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
conn->sndseq_max = predicted_seqno;
}
ninfo("SEND: wrb=%p nrtx=%u tx_unacked=%u sent=%u\n",
ninfo("SEND: wrb=%p nrtx=%u tx_unacked=%" PRIu32 " sent=%" PRIu32 "\n",
wrb, TCP_WBNRTX(wrb), conn->tx_unacked, conn->sent);
/* Increment the count of bytes sent from this write buffer */