diff options
-rw-r--r-- | src/osmo-bsc/abis_nm.c | 8 | ||||
-rw-r--r-- | src/osmo-bsc/abis_om2000.c | 5 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index a460f3e3b..8eeba8912 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -230,8 +230,10 @@ static int update_admstate(struct gsm_bts *bts, uint8_t obj_class, nsd.new_state.administrative = adm_state; - osmo_signal_dispatch(SS_NM, S_NM_STATECHG, &nsd); + /* Update current state before emitting signal: */ nm_state->administrative = adm_state; + + osmo_signal_dispatch(SS_NM, S_NM_STATECHG, &nsd); return 0; } @@ -296,10 +298,10 @@ static int abis_nm_rx_statechg_rep(struct msgb *mb) nsd.new_state.operational != nsd.old_state.operational || nsd.new_state.availability != nsd.old_state.availability) { DEBUGPC(DNM, "\n"); - /* Update the operational state of a given object in our in-memory data + /* Update the state of a given object in our in-memory data * structures and send an event to the higher layer */ - osmo_signal_dispatch(SS_NM, S_NM_STATECHG, &nsd); *nm_state = nsd.new_state; + osmo_signal_dispatch(SS_NM, S_NM_STATECHG, &nsd); } else { DEBUGPC(DNM, "(No State change detected)\n"); } diff --git a/src/osmo-bsc/abis_om2000.c b/src/osmo-bsc/abis_om2000.c index 04c783b4c..1deab1364 100644 --- a/src/osmo-bsc/abis_om2000.c +++ b/src/osmo-bsc/abis_om2000.c @@ -992,9 +992,10 @@ static void update_mo_state(struct gsm_bts *bts, struct abis_om2k_mo *mo, uint8_ break; } - osmo_signal_dispatch(SS_NM, S_NM_STATECHG, &nsd); - + /* Update current state before emitting signal: */ nm_state->availability = nsd.new_state.availability; + + osmo_signal_dispatch(SS_NM, S_NM_STATECHG, &nsd); } static void update_op_state(struct gsm_bts *bts, const struct abis_om2k_mo *mo, uint8_t op_state) |