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
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-netif/+/30148
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I5fd64acf7bc1e53efae0674d0c906d1255a9bbf6
Gerrit-Change-Number: 30148
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 16 Nov 2022 11:04:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment