Attention is currently required from: osmith, daniel. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/30158 )
Change subject: osmux: Rotate over available Osmux CID when allocating a new one ......................................................................
Patch Set 1:
(1 comment)
File src/common/osmux.c:
https://gerrit.osmocom.org/c/osmo-bts/+/30158/comment/a990d1c6_98f7734d PS1, Line 67: <=
should probably be <, otherwise you check start_i twice? it's also < below for the start_j check
No, it must be <=. See for instance scenario where you start with next_free_osmux_cid_lookup=3 and all but 0, 1, 2 are occupied.
You start with i=0,j=3 in the first loop, you reach the end of the array. You start then the 2nd loop, and you need to check the case where i=0 because you still have to check j=0,1,2.