Attention is currently required from: manawyrm, tnt. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/27716 )
Change subject: RIFO: fix frame_rifo_in check on frame number wrap-around ......................................................................
Patch Set 1:
(1 comment)
File src/octoi/frame_rifo.c:
https://gerrit.osmocom.org/c/osmo-e1d/+/27716/comment/9d338bec_b8dd9532 PS1, Line 117: if ( fn < rifo->next_out_fn - FRAMES_PER_FIFO ) I'm not really following here. so the previous check was whether we try to insert a frame number that is too large. Your new check is for a frame number that is too small ("min_in_fn").
But the way how you nested the new if clause, it means -ERANGE is only returned if it's both larger than max_in_fn and smaller than "min_in_fn", i.e. never?
I guess we shold define a frame_rifo_min_in_fn() function similar to frame_rifo_max_in_fn() and then have an or-statement here if it's either less than min_in_fn or greater than max_in_fn?