net/tcp/tcp_sendfile.c: Fix syslog formats
This commit is contained in:
parent
4911b1121b
commit
634713cec4
@ -46,6 +46,7 @@
|
|||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -151,7 +152,7 @@ static uint16_t ack_eventhandler(FAR struct net_driver_s *dev,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
pstate->snd_acked = tcp_getsequence(tcp->ackno) - pstate->snd_isn;
|
pstate->snd_acked = tcp_getsequence(tcp->ackno) - pstate->snd_isn;
|
||||||
ninfo("ACK: acked=%d sent=%d flen=%d\n",
|
ninfo("ACK: acked=%d sent=%zd flen=%zu\n",
|
||||||
pstate->snd_acked, pstate->snd_sent, pstate->snd_flen);
|
pstate->snd_acked, pstate->snd_sent, pstate->snd_flen);
|
||||||
|
|
||||||
dev->d_sndlen = 0;
|
dev->d_sndlen = 0;
|
||||||
@ -274,7 +275,7 @@ static uint16_t sendfile_eventhandler(FAR struct net_driver_s *dev,
|
|||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
ninfo("flags: %04x acked: %d sent: %d\n",
|
ninfo("flags: %04x acked: %d sent: %zd\n",
|
||||||
flags, pstate->snd_acked, pstate->snd_sent);
|
flags, pstate->snd_acked, pstate->snd_sent);
|
||||||
|
|
||||||
/* We get here if (1) not all of the data has been ACKed, (2) we have been
|
/* We get here if (1) not all of the data has been ACKed, (2) we have been
|
||||||
@ -334,15 +335,15 @@ static uint16_t sendfile_eventhandler(FAR struct net_driver_s *dev,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
seqno = pstate->snd_sent + pstate->snd_isn;
|
seqno = pstate->snd_sent + pstate->snd_isn;
|
||||||
ninfo("SEND: sndseq %08x->%08x len: %d\n",
|
ninfo("SEND: sndseq %08" PRIx32 "->%08" PRIx32 " len: %d\n",
|
||||||
conn->sndseq, seqno, ret);
|
tcp_getsequence(conn->sndseq), seqno, ret);
|
||||||
|
|
||||||
tcp_setsequence(conn->sndseq, seqno);
|
tcp_setsequence(conn->sndseq, seqno);
|
||||||
|
|
||||||
/* Update the amount of data sent (but not necessarily ACKed) */
|
/* Update the amount of data sent (but not necessarily ACKed) */
|
||||||
|
|
||||||
pstate->snd_sent += sndlen;
|
pstate->snd_sent += sndlen;
|
||||||
ninfo("pid: %d SEND: acked=%d sent=%d flen=%d\n", getpid(),
|
ninfo("pid: %d SEND: acked=%d sent=%zd flen=%zu\n", getpid(),
|
||||||
pstate->snd_acked, pstate->snd_sent, pstate->snd_flen);
|
pstate->snd_acked, pstate->snd_sent, pstate->snd_flen);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user