[PATCH] osmo-bts[master]: LC15: common/oml.c : Alarm - Formatted O&M message too short

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
Mon Jun 13 13:29:19 UTC 2016


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

LC15: common/oml.c : Alarm - Formatted O&M message too short

Change-Id: I697c7e14efb2ebdbf789b2e0db13c43521791d85
---
M src/common/oml.c
1 file changed, 19 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/55/255/1

diff --git a/src/common/oml.c b/src/common/oml.c
index b32231b..b5394dc 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -981,9 +981,27 @@
 	struct abis_om_fom_hdr *foh = msgb_l3(msg);
 	struct gsm_bts_trx *trx;
 	int ret;
+	char log_msg[100];
+	struct gsm_failure_evt_rep failure_rep;
 
 	if (msgb_l2len(msg) < sizeof(*foh)) {
-		LOGP(DOML, LOGL_NOTICE, "Formatted O&M message too short\n");
+		snprintf(log_msg, 100, "Formatted O&M message too short\n");
+		LOGP(DOML, LOGL_NOTICE,"%s", log_msg);
+
+		failure_rep.event_type = NM_EVT_COMM_FAIL;
+		failure_rep.event_serverity = NM_SEVER_MAJOR;
+		failure_rep.cause_type = NM_PCAUSE_T_MANUF;
+		failure_rep.event_cause = NM_MM_EVT_MAJ_UKWN_MSG;
+		failure_rep.add_text = (char *)&log_msg;
+
+		trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr);
+		if (trx) {
+			trx->mo.obj_inst.bts_nr = 0;
+			trx->mo.obj_inst.trx_nr = foh->obj_inst.trx_nr;
+			trx->mo.obj_inst.ts_nr = 0xff;
+			oml_tx_failure_event_rep(&trx->mo, failure_rep);
+		}
+
 		return -EIO;
 	}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I697c7e14efb2ebdbf789b2e0db13c43521791d85
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Minh-Quang Nguyen <minh-quang.nguyen at nutaq.com>



More information about the gerrit-log mailing list