diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-07-03 14:57:01 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-07-05 18:16:01 +0200 |
commit | a470d016b1d7b9a2f08503438ca3f37153161004 (patch) | |
tree | 9e8e851e4f0725da8a791736ec9602c571d5e2cb | |
parent | 0a6bdb024f5429a35c56178496158c9b1c3ee032 (diff) |
pcu_sock: Avoid presenting TS from disabled TRX as available to PCU
Change-Id: I4b24faf3a8fe5846b9394fea8faf9d37cc0ac9ff
-rw-r--r-- | src/common/pcu_sock.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index f4a8c0ac..5fa0e19e 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -35,6 +35,7 @@ #include <osmocom/core/select.h> #include <osmocom/core/socket.h> #include <osmocom/gsm/gsm23003.h> +#include <osmocom/gsm/abis_nm.h> #include <osmo-bts/logging.h> #include <osmo-bts/gsm_data.h> #include <osmo-bts/pcu_if.h> @@ -219,6 +220,13 @@ int pcu_tx_info_ind(void) info_ind->trx[i].pdch_mask = 0; info_ind->trx[i].arfcn = trx->arfcn; info_ind->trx[i].hlayer1 = trx_get_hlayer1(trx); + if (trx->mo.nm_state.operational != NM_OPSTATE_ENABLED || + trx->mo.nm_state.administrative != NM_STATE_UNLOCKED) { + LOGPTRX(trx, DPCU, LOGL_INFO, "unavailable for PCU (op=%s adm=%s)\n", + abis_nm_opstate_name(trx->mo.nm_state.operational), + abis_nm_admin_name(trx->mo.nm_state.administrative)); + continue; + } for (j = 0; j < 8; j++) { ts = &trx->ts[j]; if (ts->mo.nm_state.operational == NM_OPSTATE_ENABLED |