[PATCH] osmo-bts[master]: LC15: common/l1sap.c : Alarm - Unknown uplink L1SAP primitive

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:20 UTC 2016


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

LC15: common/l1sap.c : Alarm - Unknown uplink L1SAP primitive

Change-Id: I4943eabecb971f7cfece24c35b0e9e0e660f31a0
---
M src/common/l1sap.c
1 file changed, 13 insertions(+), 2 deletions(-)


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

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 77fd1a0..78e15e7 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -46,6 +46,7 @@
 #include <osmo-bts/bts_model.h>
 #include <osmo-bts/handover.h>
 #include <osmo-bts/power_control.h>
+#include "osmo-bts/oml.h"
 
 static struct gsm_lchan *
 get_lchan_by_chan_nr(struct gsm_bts_trx *trx, unsigned int chan_nr)
@@ -933,6 +934,8 @@
 {
 	struct msgb *msg = l1sap->oph.msg;
 	int rc = 0;
+	char log_msg[100];
+	struct gsm_failure_evt_rep failure_rep;
 
 	switch (OSMO_PRIM_HDR(&l1sap->oph)) {
 	case OSMO_PRIM(PRIM_MPH_INFO, PRIM_OP_INDICATION):
@@ -959,8 +962,16 @@
 		rc = l1sap_ph_rach_ind(trx, l1sap, &l1sap->u.rach_ind);
 		break;
 	default:
-		LOGP(DL1P, LOGL_NOTICE, "unknown prim %d op %d\n",
-			l1sap->oph.primitive, l1sap->oph.operation);
+		snprintf(log_msg, 100, "unknown prim %d op %d\n",
+				l1sap->oph.primitive, l1sap->oph.operation);
+		LOGP(DL1P, 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;
+		oml_tx_failure_event_rep(&trx->mo, failure_rep);
 		break;
 	}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4943eabecb971f7cfece24c35b0e9e0e660f31a0
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