Review at  https://gerrit.osmocom.org/5085

OML: check TRX usability when reporting

Use already available function to check that TRX is actually usable when
reporting OML status via CTRL.

Change-Id: I3f5f95b9d6cd00fa437bfbe89cc7ecdd87d2801a
Related: OS#2486
---
M src/libbsc/abis_nm.c
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c
index f1a56a6..c9f03e1 100644
--- a/src/libbsc/abis_nm.c
+++ b/src/libbsc/abis_nm.c
@@ -46,6 +46,7 @@
 #include <osmocom/bsc/misdn.h>
 #include <osmocom/bsc/signal.h>
 #include <osmocom/abis/e1_input.h>
+#include <osmocom/bsc/chan_alloc.h>
 
 #define OM_ALLOC_SIZE          1024
 #define OM_HEADROOM_SIZE       128
@@ -693,6 +694,10 @@
        llist_for_each_entry(trx, &bts->trx_list, list) {
                if (!trx->rsl_link)
                        return false;
+
+               if (!trx_is_usable(trx))
+                       return false;
+
                if (trx->mo.nm_state.administrative == NM_STATE_LOCKED)
                        return false;
        }

-- 
To view, visit https://gerrit.osmocom.org/5085
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f5f95b9d6cd00fa437bfbe89cc7ecdd87d2801a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Max <[email protected]>

Reply via email to