From aa1884ff414d35ae3c50ceb21388325ae8040cf2 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Fri, 24 May 2019 15:07:21 +0200 Subject: [PATCH] Set correct size in log --- src/packet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packet.c b/src/packet.c index 12d2a8b..fd59c70 100644 --- a/src/packet.c +++ b/src/packet.c @@ -129,7 +129,7 @@ enum FD_STATE read_packet_from_udp (int fd, struct buffer_packet* bp, struct udp void dump_buffer_packet(struct buffer_packet* bp) { printf("\n"); - printf(" mode=%d, aread=%d, awrite=%d, ap_count=%d\n", bp->mode, bp->aread, bp->awrite, bp->ap_count); + printf(" mode=%d, aread=%d, awrite=%d, ap_count=%d, usage=%ld/%ld\n", bp->mode, bp->aread, bp->awrite, bp->ap_count, get_full_size (bp), sizeof(struct internet_packet)); union abstract_packet* ap = &bp->ip.ap; for (int i = 0; i < bp->ap_count; i++) { dump_abstract_packet(ap);