dexter has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/30875 )


Change subject: pcu_sock: check trx mo state
......................................................................

pcu_sock: check trx mo state

Make sure that the TRX MO state is enabled and unlocked before filling
in any TRX information into the info indication

Change-Id: I7a93826e6b0df187425310cb82854e7d7fb47e72
Related: OS#5198
---
M src/osmo-bsc/pcu_sock.c
1 file changed, 8 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/75/30875/1

diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c
index a1174dd..1be8196 100644
--- a/src/osmo-bsc/pcu_sock.c
+++ b/src/osmo-bsc/pcu_sock.c
@@ -33,6 +33,7 @@
 #include <osmocom/core/logging.h>
 #include <osmocom/gsm/l1sap.h>
 #include <osmocom/gsm/gsm0502.h>
+#include <osmocom/bsc/abis_nm.h>

 #include <osmocom/bsc/gsm_data.h>
 #include <osmocom/bsc/pcu_if.h>
@@ -113,6 +114,13 @@
        trx_info->pdch_mask = 0;
        trx_info->arfcn = trx->arfcn;

+       if (trx->mo.nm_state.operational != NM_OPSTATE_ENABLED || 
trx->mo.nm_state.administrative != NM_STATE_UNLOCKED) {
+               LOG_BTS(trx->bts, 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));
+               return;
+       }
+
        for (tn = 0; tn < ARRAY_SIZE(trx->ts); tn++) {
                ts = &trx->ts[tn];
                if (ts->mo.nm_state.operational != NM_OPSTATE_ENABLED ||

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30875
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I7a93826e6b0df187425310cb82854e7d7fb47e72
Gerrit-Change-Number: 30875
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <[email protected]>
Gerrit-MessageType: newchange

Reply via email to