[PATCH] osmo-bts[master]: LC15: common/bts.c : Alarm - Failed to establish RSL link an...

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/.

Minh-Quang Nguyen gerrit-no-reply at lists.osmocom.org
Tue Jun 14 15:23:06 UTC 2016


Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/251

to look at the new patch set (#2).

LC15: common/bts.c : Alarm - Failed to establish RSL link and deactivate RF

Change-Id: I8adac2c9dd1570feec14b3e66f8b05c4274cf127
---
M src/common/bts.c
1 file changed, 22 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/51/251/2

diff --git a/src/common/bts.c b/src/common/bts.c
index 6f621c4..69692b9 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -44,6 +44,7 @@
 #include <osmo-bts/rsl.h>
 #include <osmo-bts/oml.h>
 #include <osmo-bts/signal.h>
+#include "osmo-bts/oml.h"
 
 #define MIN_QUAL_RACH    5.0f   /* at least  5 dB C/I */
 #define MIN_QUAL_NORM   -0.5f   /* at least -1 dB C/I */
@@ -250,6 +251,9 @@
 int trx_link_estab(struct gsm_bts_trx *trx)
 {
 	struct e1inp_sign_link *link = trx->rsl_link;
+	int rc;
+	char log_msg[100];
+	struct gsm_failure_evt_rep failure_rep;
 	uint8_t radio_state = link ?  NM_OPSTATE_ENABLED : NM_OPSTATE_DISABLED;
 
 	LOGP(DSUM, LOGL_INFO, "RSL link (TRX %02x) state changed to %s, sending Status'.\n",
@@ -258,11 +262,26 @@
 	oml_mo_state_chg(&trx->mo, radio_state, NM_AVSTATE_OK);
 
 	if (link)
-		rsl_tx_rf_res(trx);
+		rc = rsl_tx_rf_res(trx);
 	else
-		bts_model_trx_deact_rf(trx);
+		rc = bts_model_trx_deact_rf(trx);
 
-	return 0;
+	if(rc < 0) {
+		if(link)
+			snprintf(log_msg, 100, "Failed to establish RSL link (%d)\n", rc);
+		else
+			snprintf(log_msg, 100, "Failed to deactivate RF (%d)\n", rc);
+
+		failure_rep.event_type = NM_EVT_PROC_FAIL;
+		failure_rep.event_serverity = NM_SEVER_CRITICAL;
+		failure_rep.cause_type = NM_PCAUSE_T_MANUF;
+		failure_rep.event_cause = NM_MM_EVT_MAJ_RSL_FAIL;
+		failure_rep.add_text = (char *)&log_msg;
+
+		oml_tx_failure_event_rep(&trx->mo, failure_rep);
+	}
+
+	return rc;
 }
 
 /* set the availability of the TRX (used by PHY driver) */

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8adac2c9dd1570feec14b3e66f8b05c4274cf127
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Minh-Quang Nguyen <minh-quang.nguyen at nutaq.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list