From 48eca2524cb960b4ea430e228fcb80be73a512f5 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 30 Jun 2013 15:05:09 +0200 Subject: Don't send OML STATE CHANGE before OML is connected Instead of calling oml_mo_state_chg() [which transmits OML STATE CHG] during bts_init(), we use a new oml_mo_state_init() function which simply sets the state. --- src/common/oml.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/common/oml.c') diff --git a/src/common/oml.c b/src/common/oml.c index 5a647097..62078662 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -229,6 +229,13 @@ int oml_tx_state_changed(struct gsm_abis_mo *mo) return oml_mo_send_msg(mo, nmsg, NM_MT_STATECHG_EVENT_REP); } +/* First initialization of MO, does _not_ generate state changes */ +int oml_mo_state_init(struct gsm_abis_mo *mo, int op_state, int avail_state) +{ + mo->nm_state.availability = avail_state; + mo->nm_state.operational = op_state; +} + int oml_mo_state_chg(struct gsm_abis_mo *mo, int op_state, int avail_state) { int rc = 0; -- cgit v1.2.3