aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-10-21 18:25:10 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-10-21 18:32:08 +0200
commit4d7c6ad860a1b1af24b892c9dd151fc318195c15 (patch)
tree1a57f2a437ce6fd06bd3e033b71d385c92426dfb
parent26cc8580f605bb9f1fb9a317d2d3e9da6284ce29 (diff)
oml: Set NM_OPSTATE_DISABLED by default
Otherwise, some objects are announced at startup of osmo-bts towards BSC during State Changed Report as being "NULL". According to TS 12.21: "NULL(Operat. state not supported) FF" Which doesn't make much sense in startup situation. They are in known state Disabled until they are OPSTARTed. Change-Id: I5ba6756ea069d0f995f453ee4b27e6839c914eb1
-rw-r--r--src/common/bts.c6
-rw-r--r--src/common/oml.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/common/bts.c b/src/common/bts.c
index a1f29ff4..6c25cbdb 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -356,9 +356,9 @@ int bts_init(struct gsm_bts *bts)
oml_mo_state_init(&bts->mo, NM_OPSTATE_DISABLED, NM_AVSTATE_NOT_INSTALLED);
/* set BTS attr to dependency */
- oml_mo_state_init(&bts->gprs.nse.mo, -1, NM_AVSTATE_DEPENDENCY);
- oml_mo_state_init(&bts->gprs.cell.mo, -1, NM_AVSTATE_DEPENDENCY);
- oml_mo_state_init(&bts->gprs.nsvc[0].mo, -1, NM_AVSTATE_DEPENDENCY);
+ oml_mo_state_init(&bts->gprs.nse.mo, NM_OPSTATE_DISABLED, NM_AVSTATE_DEPENDENCY);
+ oml_mo_state_init(&bts->gprs.cell.mo, NM_OPSTATE_DISABLED, NM_AVSTATE_DEPENDENCY);
+ oml_mo_state_init(&bts->gprs.nsvc[0].mo, NM_OPSTATE_DISABLED, NM_AVSTATE_DEPENDENCY);
oml_mo_state_init(&bts->gprs.nsvc[1].mo, NM_OPSTATE_DISABLED, NM_AVSTATE_OFF_LINE);
/* allocate a talloc pool for ORTP to ensure it doesn't have to go back
diff --git a/src/common/oml.c b/src/common/oml.c
index e48f9435..02b17701 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -1562,7 +1562,7 @@ void gsm_mo_init(struct gsm_abis_mo *mo, struct gsm_bts *bts,
mo->obj_inst.bts_nr = p1;
mo->obj_inst.trx_nr = p2;
mo->obj_inst.ts_nr = p3;
- mo->nm_state.operational = NM_OPSTATE_NULL;
+ mo->nm_state.operational = NM_OPSTATE_DISABLED;
mo->nm_state.availability = NM_AVSTATE_POWER_OFF;
mo->nm_state.administrative = NM_STATE_LOCKED;
}