On Fri, Oct 01, 2021 at 03:31:55AM +0000, redmine@lists.osmocom.org wrote:
The comment is
/* Use the TSC provided in the modification request, if any. Otherwise use the timeslot's configured
but for know I don't figure out where the modification request is coming from. maybe it makes some sense to neels
The comment should have said "Use the TSC provided in the activation request",
it's a copy paste error from the TSC code for Channel Mode Modify. (Patch to fix is out)
- lchan->activate.tsc = (lchan->activate.info.tsc >= 0) ? lchan->activate.info.tsc : gsm_ts_tsc(lchan->ts);
+ lchan->activate.tsc = (lchan->activate.info.tsc >= 1) ? lchan->activate.info.tsc : gsm_ts_tsc(lchan->ts);
It should actually be >= 0, gsm_data.h:627:
/* TSC to use, or -1 for automatically determining the TSC to use. Valid range is 0 to 7, as described in 3GPP
* TS 45.002. */
int tsc;
But I see that the channel activation during handover fails to set tsc to -1.
Goodness, thanks for spotting this, I pretty much broke handover with the TSC refactoring!
I tweaked ttcn3 tests to detect the ill TSC in handover, and submitted a patch
to fix the TSC and help prevent future errors like this:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25662
https://gerrit.osmocom.org/c/osmo-bsc/+/25659