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/assignment_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/assignment_fsm.c')
-rw-r--r-- | src/osmo-bsc/assignment_fsm.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c index e73f90281..a2b17463f 100644 --- a/src/osmo-bsc/assignment_fsm.c +++ b/src/osmo-bsc/assignment_fsm.c @@ -432,8 +432,9 @@ static void assignment_fsm_wait_rr_ass_complete(struct osmo_fsm_inst *fi, uint32 return; case ASSIGNMENT_EV_LCHAN_ESTABLISHED: - /* The lchan is already done with all of its RTP setup. We will notice the lchan state to - * be established in assignment_fsm_wait_lchan_established_onenter(). */ + LOG_ASSIGNMENT(conn, LOGL_DEBUG, "lchan established, still waiting for RR Assignment Complete\n"); + /* The lchan is already done with all of its RTP setup. We will notice the lchan state + * being LCHAN_ST_ESTABLISHED in assignment_fsm_wait_lchan_established_onenter(). */ return; case ASSIGNMENT_EV_RR_ASSIGNMENT_FAIL: @@ -452,8 +453,10 @@ static void assignment_fsm_wait_lchan_established_onenter(struct osmo_fsm_inst * { struct gsm_subscriber_connection *conn = assignment_fi_conn(fi); /* Do we still need to wait for the RTP stream at all? */ - if (lchan_state_is(conn->assignment.new_lchan, LCHAN_ST_ESTABLISHED)) + if (lchan_state_is(conn->assignment.new_lchan, LCHAN_ST_ESTABLISHED)) { + LOG_ASSIGNMENT(conn, LOGL_DEBUG, "lchan fully established, no need to wait"); assignment_fsm_post_lchan_established(fi); + } } static void assignment_fsm_wait_lchan_established(struct osmo_fsm_inst *fi, uint32_t event, void *data) @@ -557,6 +560,7 @@ static const struct osmo_fsm_state assignment_fsm_states[] = { .in_event_mask = 0 | S(ASSIGNMENT_EV_RR_ASSIGNMENT_COMPLETE) | S(ASSIGNMENT_EV_RR_ASSIGNMENT_FAIL) + | S(ASSIGNMENT_EV_LCHAN_ESTABLISHED) , .out_state_mask = 0 | S(ASSIGNMENT_ST_WAIT_LCHAN_ESTABLISHED) |