Set correct size in log

This commit is contained in:
Quentin 2019-05-24 15:07:21 +02:00
parent 5d8bd6b435
commit aa1884ff41

View file

@ -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("<Buffer Packet>\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);