This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgHello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/940 to look at the new patch set (#3). dyn TS: fix: e1_config.c: switch(pchan) for dyn TS Add ts_is_tch() in gsm_data_shared.h/.c and use it to replace a switch on the pchan in e1_config.c. This patch is not due to an actual observed failure. A general grep for switch on pchan turned up this instance that doesn't handle dyn TS properly. Hence this patch is not actually tested with real equipment. Change-Id: Ide4f156034bab77140d2d9a8c462d68ae6f0d6a6 --- M openbsc/include/openbsc/gsm_data_shared.h M openbsc/src/libbsc/e1_config.c M openbsc/src/libcommon/gsm_data_shared.c 3 files changed, 18 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/40/940/3 diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 7c8fb59..368ac6b 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -855,5 +855,6 @@ int *rc); uint8_t ts_subslots(struct gsm_bts_trx_ts *ts); +bool ts_is_tch(struct gsm_bts_trx_ts *ts); #endif diff --git a/openbsc/src/libbsc/e1_config.c b/openbsc/src/libbsc/e1_config.c index d82b009..0c3250f 100644 --- a/openbsc/src/libbsc/e1_config.c +++ b/openbsc/src/libbsc/e1_config.c @@ -63,15 +63,10 @@ return -ENOMEM; } - switch (ts->pchan) { - case GSM_PCHAN_TCH_F: - case GSM_PCHAN_TCH_H: + if (ts_is_tch(ts)) { e1_ts = &line->ts[e1_link->e1_ts-1]; e1inp_ts_config_trau(e1_ts, line, subch_cb); subch_demux_activate(&e1_ts->trau.demux, e1_link->e1_ts_ss); - break; - default: - break; } return 0; diff --git a/openbsc/src/libcommon/gsm_data_shared.c b/openbsc/src/libcommon/gsm_data_shared.c index 371e479..4eea21e 100644 --- a/openbsc/src/libcommon/gsm_data_shared.c +++ b/openbsc/src/libcommon/gsm_data_shared.c @@ -747,3 +747,19 @@ { return subslots_per_pchan[ts_pchan(ts)]; } + +static bool pchan_is_tch(enum gsm_phys_chan_config pchan) +{ + switch (pchan) { + case GSM_PCHAN_TCH_F: + case GSM_PCHAN_TCH_H: + return true; + default: + return false; + } +} + +bool ts_is_tch(struct gsm_bts_trx_ts *ts) +{ + return pchan_is_tch(ts_pchan(ts)); +} -- To view, visit https://gerrit.osmocom.org/940 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ide4f156034bab77140d2d9a8c462d68ae6f0d6a6 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>