cosmetic: rename conn_fsm "bump" event to "release_when_unused"
The naming of "bump" was short and made sense to me at the time of writing, but
it is keeping pretty much everyone else at a distance, no-one intuitively gets
what it is supposed to mean.
Clarify by renaming to "release_when_unused".
Adjust test expectations.
Change-Id: I4dcc55f536f63b13a3da29fff1df5fe16751f83a
diff --git a/src/libmsc/osmo_msc.c b/src/libmsc/osmo_msc.c
index 323baf9..01e44f3 100644
--- a/src/libmsc/osmo_msc.c
+++ b/src/libmsc/osmo_msc.c
@@ -47,7 +47,7 @@
gsm411_sapi_n_reject(conn);
}
-static void subscr_conn_bump(struct gsm_subscriber_connection *conn)
+static void subscr_conn_release_when_unused(struct gsm_subscriber_connection *conn)
{
if (!conn)
return;
@@ -55,12 +55,12 @@
return;
if (!(conn->conn_fsm->state == SUBSCR_CONN_S_ACCEPTED
|| conn->conn_fsm->state == SUBSCR_CONN_S_COMMUNICATING)) {
- DEBUGP(DMM, "%s: bump: conn still being established (%s)\n",
- vlr_subscr_name(conn->vsub),
+ DEBUGP(DMM, "%s: %s: conn still being established (%s)\n",
+ vlr_subscr_name(conn->vsub), __func__,
osmo_fsm_inst_state_name(conn->conn_fsm));
return;
}
- osmo_fsm_inst_dispatch(conn->conn_fsm, SUBSCR_CONN_E_BUMP, NULL);
+ osmo_fsm_inst_dispatch(conn->conn_fsm, SUBSCR_CONN_E_RELEASE_WHEN_UNUSED, NULL);
}
/* receive a Level 3 Complete message and return MSC_CONN_ACCEPT or
@@ -71,8 +71,7 @@
msc_subscr_conn_get(conn, MSC_CONN_USE_COMPL_L3);
gsm0408_dispatch(conn, msg);
- /* Bump whether the conn wants to be closed */
- subscr_conn_bump(conn);
+ subscr_conn_release_when_unused(conn);
/* If this should be kept, the conn->conn_fsm has placed a use_count */
msc_subscr_conn_put(conn, MSC_CONN_USE_COMPL_L3);
@@ -106,8 +105,7 @@
msc_subscr_conn_get(conn, MSC_CONN_USE_DTAP);
gsm0408_dispatch(conn, msg);
- /* Bump whether the conn wants to be closed */
- subscr_conn_bump(conn);
+ subscr_conn_release_when_unused(conn);
msc_subscr_conn_put(conn, MSC_CONN_USE_DTAP);
}