From cd219d88f7895688637036dcd91f99aaa4247177 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Sat, 29 Aug 2020 03:24:18 +0000 Subject: handover_fsm: signal Clear from gscon, for proper HO result counts An inter-BSC-OUT handover ends with a Clear Command, which HO_OUT_ST_WAIT_CLEAR waits for. Actually tell the handover_fsm.c about an incoming Clear Command, so that the inter-BSC-OUT success can be counted. Similarly, count failing handover results for an unexpected Clear Command from the MSC. Related: OS#4736 Change-Id: I0c489838a99f930e2104619ca745191d2a736f1b --- src/osmo-bsc/bsc_subscr_conn_fsm.c | 5 +++++ src/osmo-bsc/handover_fsm.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c index e7c6efe09..b6ea59f48 100644 --- a/src/osmo-bsc/bsc_subscr_conn_fsm.c +++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c @@ -771,6 +771,11 @@ static void gscon_fsm_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *d case GSCON_EV_A_CLEAR_CMD: conn->rx_clear_command = true; + /* Give the handover_fsm a chance to book this as handover success before tearing down everything, + * making it look like a sudden death failure. */ + if (conn->ho.fi) + osmo_fsm_inst_dispatch(conn->ho.fi, HO_EV_CONN_RELEASING, NULL); + OSMO_ASSERT(data); ccd = data; if (conn->lchan) diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c index d93e5bcb8..8e231e0eb 100644 --- a/src/osmo-bsc/handover_fsm.c +++ b/src/osmo-bsc/handover_fsm.c @@ -1269,6 +1269,8 @@ static void ho_out_fsm_wait_clear(struct osmo_fsm_inst *fi, uint32_t event, void { struct gsm_subscriber_connection *conn = ho_fi_conn(fi); switch (event) { + /* See also ho_fsm_allstate_action() for ho_success() on HO_EV_CONN_RELEASING */ + case HO_EV_RR_HO_FAIL: ho_fail(HO_RESULT_FAIL_RR_HO_FAIL, "Received RR Handover Failure message"); return; -- cgit v1.2.3