pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/30148 )
Change subject: osmux: Rework log formatting when replaying detected RTP gaps ......................................................................
Patch Set 1:
(1 comment)
File src/osmux_input.c:
https://gerrit.osmocom.org/c/libosmo-netif/+/30148/comment/6326fda2_317947ac PS1, Line 366: d
Ack
@laforge this calculation seems to be correct due to how unsigned subtraction and conversion to signed works. This is also how the before() and after() functions are implemented in the linux kernel.
Checked with a unit test in gdb: 448 diff = cur_seq - last_seq; (gdb) print last_seq $4 = 65535 (gdb) print cur_seq $5 = 1 (gdb) n 453 if (diff <= 1) (gdb) print diff $6 = 2