Fix a bug in identifier waited

This commit is contained in:
Quentin 2019-03-19 21:15:51 +01:00
parent 94e3ae872f
commit aed1bea991

View file

@ -136,7 +136,7 @@ void rr_pkt_register(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo,
if (timeout <= 0) timeout = 0; if (timeout <= 0) timeout = 0;
int idx_waited = (bp->ip.ap.str.id - 1) % PACKET_BUFFER_SIZE; int idx_waited = (bp->ip.ap.str.id - 1) % PACKET_BUFFER_SIZE;
rr->wait[idx_waited].on = 1; rr->wait[idx_waited].on = 1;
rr->wait[idx_waited].id = bp->ip.ap.str.id; rr->wait[idx_waited].id = bp->ip.ap.str.id - 1;
rr->wait[idx_waited].link_num = bp->ip.ap.str.prevlink; rr->wait[idx_waited].link_num = bp->ip.ap.str.prevlink;
rr->wait[idx_waited].timer_fd = set_timeout(ctx, timeout, &rr->wait[idx_waited]); rr->wait[idx_waited].timer_fd = set_timeout(ctx, timeout, &rr->wait[idx_waited]);
} }