diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-05-07 23:26:34 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2018-05-14 11:56:11 +0000 |
commit | 5deea620dced57d06795ef2c22d9a918383f9376 (patch) | |
tree | c495994f5f6eda02ec991fc99c7337c4f734abe9 /src/libbsc/bsc_dyn_ts.c | |
parent | d16732f693018f4732580b01dc27e51c5a37bf4e (diff) |
cosmetic: dyn ts init: undup logging for gprs = none
Reshuffle the decision not to activate PDCH when GPRS is off:
Even though all current callers should avoid passing a PDCH activation in case
GPRS is off, it's a better idea to not assert on it and crash osmo-bsc.
Move the decision to omit PDCH activation and logging about it into the actual
functions that do PDCH activation. If PDCH activation is skipped, the lchan
then just stays as it was, and that's what it should anyway be doing.
Change-Id: Ib26642f08044d71a2469e6dbabf1e6fbcb02044d
Diffstat (limited to 'src/libbsc/bsc_dyn_ts.c')
-rw-r--r-- | src/libbsc/bsc_dyn_ts.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/libbsc/bsc_dyn_ts.c b/src/libbsc/bsc_dyn_ts.c index aa3c252f4..6a1cff703 100644 --- a/src/libbsc/bsc_dyn_ts.c +++ b/src/libbsc/bsc_dyn_ts.c @@ -27,31 +27,14 @@ void tchf_pdch_ts_init(struct gsm_bts_trx_ts *ts) { int rc; - if (ts->trx->bts->gprs.mode == BTS_GPRS_NONE) { - LOGP(DRSL, LOGL_NOTICE, "%s: GPRS mode is 'none':" - " not activating PDCH.\n", - gsm_ts_and_pchan_name(ts)); - return; - } - - LOGP(DRSL, LOGL_DEBUG, "%s: trying to PDCH ACT\n", - gsm_ts_and_pchan_name(ts)); - rc = rsl_ipacc_pdch_activate(ts, 1); - if (rc != 0) + if (rc != 0 && rc != -ENOTSUP) LOGP(DRSL, LOGL_ERROR, "%s %s: PDCH ACT failed\n", gsm_ts_name(ts), gsm_pchan_name(ts->pchan)); } void tchf_tchh_pdch_ts_init(struct gsm_bts_trx_ts *ts) { - if (ts->trx->bts->gprs.mode == BTS_GPRS_NONE) { - LOGP(DRSL, LOGL_NOTICE, "%s: GPRS mode is 'none':" - " not activating PDCH.\n", - gsm_ts_and_pchan_name(ts)); - return; - } - dyn_ts_switchover_start(ts, GSM_PCHAN_PDCH); } |