aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2022-08-03 15:15:48 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2022-08-05 11:55:41 +0200
commiteca195469ba195c643139027ec86d92d288e546e (patch)
treecefde964aa4e877b92f33ceffce0777233813582 /src/osmo-bsc
parent914e52e73a9487be260e5abbf816905b9a7f1da7 (diff)
abis_om2000: update_op_state() does not send signal
The function update_op_state() updates the OML MO, but it does not notify the update to other entities using S_NM_STATECHG Change-Id: Id19c6beb2bc79c4db0ec07ef593aacb57fff8b75 Related: OS#5634
Diffstat (limited to 'src/osmo-bsc')
-rw-r--r--src/osmo-bsc/abis_om2000.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/osmo-bsc/abis_om2000.c b/src/osmo-bsc/abis_om2000.c
index 95316115b..14f027dbf 100644
--- a/src/osmo-bsc/abis_om2000.c
+++ b/src/osmo-bsc/abis_om2000.c
@@ -1029,16 +1029,24 @@ static enum abis_nm_op_state abis_nm_op_state_from_om2k_op_state(uint8_t op_stat
static void update_op_state(struct gsm_bts *bts, const struct abis_om2k_mo *mo, uint8_t op_state)
{
struct gsm_nm_state *nm_state = mo2nm_state(bts, mo);
- struct gsm_nm_state new_state;
+ struct nm_statechg_signal_data nsd;
if (!nm_state)
return;
- new_state = *nm_state;
+ memset(&nsd, 0, sizeof(nsd));
+
+ nsd.bts = bts;
+ nsd.obj = mo2obj(bts, mo);
+ nsd.old_state = *nm_state;
+ nsd.new_state = *nm_state;
+ nsd.om2k_mo = mo;
- new_state.operational = abis_nm_op_state_from_om2k_op_state(op_state);
+ nsd.new_state.operational = abis_nm_op_state_from_om2k_op_state(op_state);
- nm_state->operational = new_state.operational;
+ /* Update current state before emitting signal: */
+ nm_state->operational = nsd.new_state.operational;
+ osmo_signal_dispatch(SS_NM, S_NM_STATECHG, &nsd);
}
static int abis_om2k_sendmsg(struct gsm_bts *bts, struct msgb *msg)