[PATCH] osmo-bsc[master]: OML: consider RSL link state

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Max gerrit-no-reply at lists.osmocom.org
Mon Oct 9 15:30:58 UTC 2017


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

OML: consider RSL link state

For "sh bts 0" command, when showing OML link state, take into
consideration RSL link state as well: if OML is up but RSL is missing
show it as degraded.

Change-Id: I5952fc59e4d82e0aa627ad91d20f964d9559a4c4
Related: OS#2486
---
M src/libbsc/bsc_vty.c
1 file changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index f1c78c8..f035989 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -237,6 +237,8 @@
 	struct pchan_load pl;
 	unsigned long long sec;
 	struct timespec tp;
+	struct gsm_bts_trx *trx;
+	bool rsl_ok = true;
 	int rc;
 
 	vty_out(vty, "BTS %u is of %s type in band %s, has CI %u LAC %u, "
@@ -310,7 +312,11 @@
 	if (is_ipaccess_bts(bts)) {
 		vty_out(vty, "  OML Link state: ");
 		if (bts->oml_link) {
-			vty_out(vty, "connected");
+			llist_for_each_entry(trx, &bts->trx_list, list) {
+				if (!trx->rsl_link)
+					rsl_ok = false;
+			}
+			vty_out(vty, rsl_ok ? "connected" : "degraded");
 			if (bts->uptime) {
 				rc = clock_gettime(CLOCK_MONOTONIC, &tp);
 				if (rc == 0) { /* monotonic clock helps to ensure that conversion below is valid */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5952fc59e4d82e0aa627ad91d20f964d9559a4c4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>



More information about the gerrit-log mailing list