Attention is currently required from: laforge. wbokslag has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-tetra/+/29388 )
Change subject: Support parsing of multiple mac resources in the same timeslot ......................................................................
Patch Set 5:
(1 comment)
File src/lower_mac/tetra_lower_mac.c:
https://gerrit.osmocom.org/c/osmo-tetra/+/29388/comment/e4fd1517_f440d0de PS4, Line 311: int parsed = 0;
again the question why those are signed, i.e. […]
In some cases (for instance, when a frame cannot be parsed propery), we cannot determine the size of the MAC PDU. In that case, a -1 will be returned. There are also some cases I haven't explored yet, such as whether an additional PDU can exist after a broadcast. A return value of -1 will lead to the lower mac to not pass any further PDUs to the upper mac for that timeslot.
Offset should be unsigned. Also, it would be more elegant to break inside the loop when a -1 is returned, instead of altering the msg pointers with the negative value. I've pushed a revision with these improvements.