Change in osmo-bts[master]: OML: Don't overwrite MO instance before oml_tx_failure_event_rep()

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Feb 10 20:05:55 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/12865 )

Change subject: OML: Don't overwrite MO instance before oml_tx_failure_event_rep()
......................................................................

OML: Don't overwrite MO instance before oml_tx_failure_event_rep()

In Change-Id Ic163bcfb6361a8ebd39e0bc0f238ef51e2cb214e we introduced
several additional calls to oml_tx_failure_event_rep() during OML
messaeg processing.  However, for some reason, we *overwrite* the
bts_nt/trx_nr/ts_nr of the TRX MO.  This is clearly wrong.  The
"address" of a managed object doesn't change at runtime!

Change-Id: Idfb80ccd6dd485d52dc006867fae3dde3fb005f3
---
M src/common/oml.c
1 file changed, 1 insertion(+), 11 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved



diff --git a/src/common/oml.c b/src/common/oml.c
index 6952d75..6d8bc4b 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -1078,12 +1078,8 @@
 										    foh->msg_type));
 		LOGPC(DOML, LOGL_ERROR, "\n");
 		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;
+		if (trx)
 			mo = &trx->mo;
-		}
 		oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UKWN_MSG, form, foh->obj_inst.bts_nr,
 					 get_value_string(abis_nm_msgtype_names, foh->msg_type));
 
@@ -1103,9 +1099,6 @@
 		LOGP(DOML, LOGL_NOTICE, "Formatted O&M message too short\n");
 		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, OSMO_EVT_MAJ_UKWN_MSG,
 						 "Formatted O&M message too short");
 		}
@@ -1150,9 +1143,6 @@
 			foh->msg_type);
 		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, OSMO_EVT_MAJ_UKWN_MSG,
 						 "unknown Formatted O&M "
 						 "msg_type 0x%02x",

-- 
To view, visit https://gerrit.osmocom.org/12865
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Idfb80ccd6dd485d52dc006867fae3dde3fb005f3
Gerrit-Change-Number: 12865
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190210/4e2ce45e/attachment.htm>


More information about the gerrit-log mailing list