aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-02-09 09:01:17 +0100
committerHarald Welte <laforge@gnumonks.org>2019-02-09 09:08:27 +0100
commit742dad5b6952c9ee32029b4d960a57721c4ef069 (patch)
tree2f0cd8fedab1d1d94383563d40b89c815de0ab9b
parent02231177a9d670acc4249774eb694b93c6838c91 (diff)
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
-rw-r--r--src/common/oml.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/common/oml.c b/src/common/oml.c
index 6952d75c..6d8bc4bc 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -1078,12 +1078,8 @@ static inline bool report_bts_number_incorrect(struct gsm_bts *bts, const struct
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 @@ static int down_fom(struct gsm_bts *bts, struct msgb *msg)
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 @@ static int down_fom(struct gsm_bts *bts, struct msgb *msg)
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",