aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-10-09 17:24:50 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2020-10-15 05:28:44 +0200
commit8cf7d9479e95b4d274a2a3eb83be209bc415a7d3 (patch)
treea1c437de41734610ad9a671e55865afacb7c7e2f /src/osmo-bsc
parentd458d0bf4817c4a23a8c478b0dc5fae6f22e3350 (diff)
BSSMAP RESET: also accept conn cfm events during ST_DISC
We don't really expect connection attempts during ST_DISC, but if the user happens to dispatch those events for whatever obscure reasons, treat them instead of erroring about an unallowed event. Change-Id: Ic7c60a40ff25ae647ee659259dfea769bc4592e4
Diffstat (limited to 'src/osmo-bsc')
-rw-r--r--src/osmo-bsc/bssmap_reset.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/osmo-bsc/bssmap_reset.c b/src/osmo-bsc/bssmap_reset.c
index 9215e902a..fcf2bab30 100644
--- a/src/osmo-bsc/bssmap_reset.c
+++ b/src/osmo-bsc/bssmap_reset.c
@@ -118,6 +118,17 @@ static void bssmap_reset_disc_action(struct osmo_fsm_inst *fi, uint32_t event, v
bssmap_reset_fsm_state_chg(fi, BSSMAP_RESET_ST_CONN);
break;
+ case BSSMAP_RESET_EV_CONN_CFM_FAILURE:
+ /* ignore */
+ break;
+
+ case BSSMAP_RESET_EV_CONN_CFM_SUCCESS:
+ /* A connection succeeded before we managed to do a RESET handshake?
+ * Then the calling code is not taking care to check bssmap_reset_is_conn_ready().
+ */
+ LOGPFSML(fi, LOGL_ERROR, "Connection success confirmed, but we have not seen a RESET-ACK; bug?\n");
+ break;
+
default:
OSMO_ASSERT(false);
}
@@ -183,6 +194,8 @@ static struct osmo_fsm_state bssmap_reset_fsm_states[] = {
.in_event_mask = 0
| S(BSSMAP_RESET_EV_RX_RESET)
| S(BSSMAP_RESET_EV_RX_RESET_ACK)
+ | S(BSSMAP_RESET_EV_CONN_CFM_FAILURE)
+ | S(BSSMAP_RESET_EV_CONN_CFM_SUCCESS)
,
.out_state_mask = 0
| S(BSSMAP_RESET_ST_DISC)