Fix another bug of comparison
This commit is contained in:
parent
cd7f12aee0
commit
1530209b22
2 changed files with 3 additions and 2 deletions
|
@ -130,6 +130,7 @@ void rr_pkt_register(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo,
|
|||
}
|
||||
|
||||
// 3. If packet arrived too early, we register a timer
|
||||
printf("%d < %d = %d\n", rr->recv_id, bp->ip.ap.str.id - 1, ring_lt(rr->recv_id, bp->ip.ap.str.id - 1));
|
||||
if (ring_lt(rr->recv_id, bp->ip.ap.str.id - 1)) {
|
||||
int64_t timeout = rr->mjit - (int64_t) bp->ip.ap.str.deltat;
|
||||
//printf("%ld - %ld = %ld\n", rr->mjit, (int64_t) bp->ip.ap.str.deltat, timeout);
|
||||
|
|
|
@ -74,9 +74,9 @@ int ring_gt(uint16_t v1, uint16_t v2) {
|
|||
}
|
||||
|
||||
int ring_le(uint16_t v1, uint16_t v2) {
|
||||
return ring_gt(v2, v1);
|
||||
return ring_ge(v2, v1);
|
||||
}
|
||||
|
||||
int ring_lt(uint16_t v1, uint16_t v2) {
|
||||
return ring_ge(v2, v1);
|
||||
return ring_gt(v2, v1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue