Better debug

This commit is contained in:
Quentin 2019-05-24 16:08:04 +02:00
parent 81040b16b9
commit 2066db1650

View file

@ -67,7 +67,10 @@ void rr_pkt_register(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo,
// 1. We queue the packet to keep it
if (rr->real[real_idx].on && ring_lt(rr->real[real_idx].id, bp->ip.ap.fmt.content.clear.id)) {
fprintf(stderr, "Real array is full for id=%d, idx=%d, BUG: [\n", bp->ip.ap.fmt.content.clear.id, real_idx);
fprintf(stderr, "Real array is full for packet_id=%d, idx=%d, last_delivered_content_id=%d BUG: [\n",
bp->ip.ap.fmt.content.clear.id,
real_idx,
rr->content_id);
for (int i = 0; i < PACKET_BUFFER_SIZE; i++) {
fprintf(stderr, "\t%d => %d\n", rr->real[i].id, rr->real[i].on);
}