aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/timeslot_fsm.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2021-05-29 23:08:22 +0000
committerNeels Hofmeyr <neels@hofmeyr.de>2021-06-10 16:15:35 +0200
commit426941e87f5476d1220ddf657a84bcfc9204a185 (patch)
tree8e7f6dcb0a59469724f09abf7c4bfff12eafc127 /src/osmo-bsc/timeslot_fsm.c
parentd163aa380588bb8628c45d7ce34838595dc6e1f2 (diff)
update the lchan name to always reflect VAMOS shadowness
Change gsm_lchan_name_compute() to a function that in-place updates the lchan->name. That allows calling it numerous times with the talloc handled internally. Rename it to lchan_update_name(). Add 'shadow' to lchan_update_name() and lchan_fsm_update_id() for VAMOS shadow lchans, and also print the lchan index that it is a shadow for, instead of the index in the lchan array. When set_pchan_is() updates the VAMOSness of the lchans, call lchan_fsm_update_id(). From lchan_fsm_update_id() also call lchan_update_name(). This is a bit convoluted for legacy reasons. There are utility programs and C tests using bts_trx.c but not lchan_fsm.c. lchan_update_name() lives in gsm_data.c for that reason. This patch calls lchan_update_name() from lchan_fsm_update_id() and not vice versa to avoid having to add stubbed lchan_fsm_update_id() functions to all utility programs and C tests. We can't easily unify the lchan->name and lchan->fi->id without lots of refactoring rippling through all those little utility programs and C tests. Change-Id: I7c2bae3b895a91f1b99b4147ecc0e3009cb7439a
Diffstat (limited to 'src/osmo-bsc/timeslot_fsm.c')
-rw-r--r--src/osmo-bsc/timeslot_fsm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/osmo-bsc/timeslot_fsm.c b/src/osmo-bsc/timeslot_fsm.c
index 64b98a67d..b9c86df96 100644
--- a/src/osmo-bsc/timeslot_fsm.c
+++ b/src/osmo-bsc/timeslot_fsm.c
@@ -204,11 +204,14 @@ void ts_set_pchan_is(struct gsm_bts_trx_ts *ts, enum gsm_phys_chan_config pchan_
lchan->vamos.is_secondary = false;
else
lchan->vamos.is_secondary = true;
+ lchan_fsm_update_id(lchan);
}
break;
default:
- ts_for_n_lchans(lchan, ts, ts->max_lchans_possible)
+ ts_for_n_lchans(lchan, ts, ts->max_lchans_possible) {
lchan->vamos.is_secondary = false;
+ lchan_fsm_update_id(lchan);
+ }
break;
}
}