osmo-bsc/openbsc/src/libbsc
Neels Hofmeyr 5f0c71b7d5 dyn TS: OS#1778 workaround: disable TCH/F on dyn TS for nitb
To avoid two phones picking mismatching TCH pchans, never pick TCH/F on dynamic
TS in osmo-nitb.

Add gsm_network flag dyn_ts_allow_tch_f, set to true by default in
gsm_network_init().

Set this flag to false in osmo-nitb's main().

See http://osmocom.org/issues/1778

Reasoning about ways to solve this:

* a compile time switch doesn't work because libbsc is first compiled and then
  linked to both osmo-nitb and osmo-bsc.

* we could test net->bsc_api == msc_bsc_api(), but I have the so-called MSC
  split waiting on branch sysmocom/cscn, which will result in msc_bsc_api() not
  being linked in the osmo-bsc binary.

* have a function am_i_nitb() with different implementations in osmo-nitb and
  osmo-bsc, but then we'd need to add implementations to all tests and other
  binaries linking lchan_alloc().

* have a flag in struct bsc_api, but so far there are only function pointers
  there.

Having a "global" flag in gsm_network allows to add a VTY command in case we
decide to keep this feature (#1781), has no linking implications and is nicely
explicit.

Tested that osmo-bsc still picks TCH/F on dyn TS indirectly, since I have no
standalone MSC available: when compiling osmo-nitb with the line that sets
dyn_ts_allow_tch_f = false commented out, TCH/F is picked as described in
OS#1778; and by printf-verifying that dyn_ts_allow_tch_f == true in osmo-bsc
main(), only osmo-nitb should have TCH/F disabled.

Related: OS#1778, OS#1781
Change-Id: If7e4797a72815fc6e2bbef27756ea5df69f4bde7
2016-07-28 17:40:59 +02:00
..
Makefile.am dyn TS: Rename bsc_dyn_pdch.c to bsc_dyn_ts.c 2016-07-28 11:56:51 +02:00
abis_nm.c dyn TS: verify_chan_comb(): handle new dyn TS NM_CHANC_* 2016-07-28 11:56:51 +02:00
abis_nm_ipaccess.c misc: Move from u_int to uint types of stdint.h 2011-04-18 17:31:39 +02:00
abis_nm_vty.c vty: Use vty_install_default() instead of bsc_install_default() 2013-10-30 15:19:00 +01:00
abis_om2000.c Fix more hidden TSC bugs for Ericsson BTS 2014-01-19 17:32:59 +01:00
abis_om2000_vty.c vty: Use vty_install_default() instead of bsc_install_default() 2013-10-30 15:19:00 +01:00
abis_rsl.c dyn TS: split dyn_pdch_init() for new dyn type and rename 2016-07-28 11:56:51 +02:00
arfcn_range_encode.c si: Implement range 128, 256, 1024 encoding 2014-01-16 12:04:30 +01:00
bsc_api.c Add extra debug output with channel mode and type 2016-04-22 15:53:51 +02:00
bsc_ctrl_commands.c bsc: Add parameter to restart a bts 2016-04-01 19:34:42 +02:00
bsc_ctrl_lookup.c enable ctrl bind config for various programs 2016-02-25 12:18:04 +01:00
bsc_dyn_ts.c dyn TS: Rename bsc_dyn_pdch.c to bsc_dyn_ts.c 2016-07-28 11:56:51 +02:00
bsc_init.c dyn PDCH: send PDCH ACT for each TCH/F_PDCH on TS Enable 2016-06-14 10:18:19 +00:00
bsc_msc.c bsc: Check for the rand and then generate a res 2015-07-01 08:16:41 +02:00
bsc_rf_ctrl.c bsc: rf_ctrl will always be created, remove the NULL checks 2014-02-08 12:47:39 +01:00
bsc_rll.c bsc: Reduce the RLL timeout to be smaller than TC1/max_retr+1 2013-12-27 19:21:58 +01:00
bsc_vty.c Modify SI 13 field to support 11 bit RACH 2016-07-28 06:49:03 +00:00
bts_ericsson_rbs2000.c Do not expect all BTSs support TSC != BCC 2014-01-19 17:32:56 +01:00
bts_init.c hsl: Remove the support for the HSL bts from OpenBSC 2013-07-03 16:19:41 +02:00
bts_ipaccess_nanobts.c dyn TS: split dyn_pdch_init() for new dyn type and rename 2016-07-28 11:56:51 +02:00
bts_nokia_site.c nokia: Allow to set the reset time for the nokia bts 2015-02-07 13:27:36 +01:00
bts_siemens_bs11.c Do not expect all BTSs support TSC != BCC 2014-01-19 17:32:56 +01:00
bts_sysmobts.c Do not expect all BTSs support TSC != BCC 2014-01-19 17:32:56 +01:00
bts_unknown.c misc: Remove sys/types.h includes from the files 2011-04-18 17:31:39 +02:00
chan_alloc.c dyn TS: OS#1778 workaround: disable TCH/F on dyn TS for nitb 2016-07-28 17:40:59 +02:00
e1_config.c hsl: Remove the support for the HSL bts from OpenBSC 2013-07-03 16:19:41 +02:00
gsm_04_08_utils.c Remove trivial wrapper function 2016-04-12 10:13:57 -04:00
handover_decision.c Use proper measurement for handover 2016-05-20 16:26:33 +00:00
handover_logic.c libbsc: skip channel state LCHAN_S_INACTIVE while handover 2016-07-09 08:53:16 +00:00
meas_proc.c src: use namespace prefix osmo_signal* 2011-05-06 12:12:31 +02:00
meas_rep.c misc: Remove sys/types.h includes from the files 2011-04-18 17:31:39 +02:00
net_init.c dyn TS: OS#1778 workaround: disable TCH/F on dyn TS for nitb 2016-07-28 17:40:59 +02:00
paging.c paging: Go through all BTS to stop paging 2015-08-03 12:02:14 +02:00
rest_octets.c Modify SI 13 field to support 11 bit RACH 2016-07-28 06:49:03 +00:00
system_information.c Modify SI 13 field to support 11 bit RACH 2016-07-28 06:49:03 +00:00