diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-07-15 13:26:46 +0200 |
---|---|---|
committer | pespin <pespin@sysmocom.de> | 2021-07-20 10:07:03 +0000 |
commit | 2956b52c5b3603f5eaf5f5168a1244cf8b287e15 (patch) | |
tree | 352f66f2821e8e521a712fbde205aee8a3cecd7e /src/osmo-bsc/bsc_vty.c | |
parent | 181b5f3b9a807b1d4396d97a6882f57fd215e757 (diff) |
Add new lchan_select_set_type() API helper
It's an easy helper, but it helps in standarizing and finding similar
places in code.
Morevoer, it will be used in follow-up commit where we first use
lchan_avail_by_type and finally we select it in a later stage.
Change-Id: I025a40962a5e5d40543b297a0760e47618fb525c
Diffstat (limited to 'src/osmo-bsc/bsc_vty.c')
-rw-r--r-- | src/osmo-bsc/bsc_vty.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index d76d02d82..9b6fa629d 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -6299,7 +6299,7 @@ static int lchan_act_single(struct vty *vty, struct gsm_lchan *lchan, const char } /* configure the lchan */ - lchan->type = lchan_t; + lchan_select_set_type(lchan, lchan_t); if (!strcmp(codec_str, "hr") || !strcmp(codec_str, "fr")) { info = (struct lchan_activate_info) { .activ_for = ACTIVATE_FOR_VTY, @@ -6792,9 +6792,9 @@ DEFUN(lchan_reassign, lchan_reassign_cmd, return CMD_WARNING; } - /* lchan_select_*() sets the lchan->type, we need to do the same here, so that activation will work out. */ - to_lchan->type = chan_mode_to_chan_type(from_lchan->current_ch_mode_rate.chan_mode, - from_lchan->current_ch_mode_rate.chan_rate); + /* Set lchan type, so that activation will work out. */ + lchan_select_set_type(to_lchan, chan_mode_to_chan_type(from_lchan->current_ch_mode_rate.chan_mode, + from_lchan->current_ch_mode_rate.chan_rate)); LOG_LCHAN(from_lchan, LOGL_NOTICE, "VTY requests re-assignment of this lchan to %s%s\n", gsm_lchan_name(to_lchan), to_lchan->vamos.is_secondary ? " (to VAMOS mode)" : ""); |