diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-07-12 05:00:03 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2018-07-28 12:18:23 +0200 |
commit | 73ecfbb8228bcefad9cbc52d6fdf3da70a534c4f (patch) | |
tree | 2037a22288ac393eb57be9d65be75234fcd871b7 /src/osmo-bsc/handover_fsm.c | |
parent | 18ce10b7b113480a43c0b11513aaf387a4a865a5 (diff) |
cosmetic: FSMs: allow ignorable events
In various FSMs, some events may appear later or earlier without need of
action. Do not indicate these as 'ERROR' (event not permitted), but allow and
ignore them.
Debug-log about some of those.
From the old code, we've taken over the habit to change into
WAIT_BEFORE_RF_RELEASE even before SAPI[0] is released. Hence we may still
receive a SAPI[0] REL_IND in WAIT_BEFORE_RF_RELEASE. Don't show this as error
message, just silently accept it.
Change-Id: Ie320c7c6a1436184aaf2ec5a1843e04f4b3414ab
Diffstat (limited to 'src/osmo-bsc/handover_fsm.c')
-rw-r--r-- | src/osmo-bsc/handover_fsm.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c index 0430a7f6d..0a6ee2471 100644 --- a/src/osmo-bsc/handover_fsm.c +++ b/src/osmo-bsc/handover_fsm.c @@ -870,6 +870,16 @@ static void ho_fsm_wait_rr_ho_complete(struct osmo_fsm_inst *fi, uint32_t event, switch (event) { + case HO_EV_RR_HO_DETECT: + /* Numerous HO Detect RACH bursts may follow after the initial one, ignore. */ + return; + + case HO_EV_LCHAN_ESTABLISHED: + LOG_HO(conn, LOGL_DEBUG, "lchan established, still waiting for RR Handover Complete\n"); + /* The lchan is already done with all of its RTP setup. We will notice the lchan state + * being LCHAN_ST_ESTABLISHED in ho_fsm_wait_lchan_established_onenter(). */ + return; + case HO_EV_RR_HO_COMPLETE: ho_fsm_state_chg(HO_ST_WAIT_LCHAN_ESTABLISHED); return; @@ -889,8 +899,10 @@ static void ho_fsm_wait_lchan_established_onenter(struct osmo_fsm_inst *fi, uint { struct gsm_subscriber_connection *conn = ho_fi_conn(fi); - if (conn->ho.fi && lchan_state_is(conn->ho.new_lchan, LCHAN_ST_ESTABLISHED)) + if (conn->ho.fi && lchan_state_is(conn->ho.new_lchan, LCHAN_ST_ESTABLISHED)) { + LOG_HO(conn, LOGL_DEBUG, "lchan already established earlier\n"); ho_fsm_post_lchan_established(fi); + } } static void ho_fsm_wait_lchan_established(struct osmo_fsm_inst *fi, uint32_t event, void *data) @@ -1066,6 +1078,8 @@ static const struct osmo_fsm_state ho_fsm_states[] = { .name = "WAIT_RR_HO_COMPLETE", .action = ho_fsm_wait_rr_ho_complete, .in_event_mask = 0 + | S(HO_EV_RR_HO_DETECT) /* ignore extra HO RACH */ + | S(HO_EV_LCHAN_ESTABLISHED) | S(HO_EV_RR_HO_COMPLETE) | S(HO_EV_RR_HO_FAIL) , |