vlr_lu_fsm: clarify naming of static functions

These functions actually return whether these procedures should be
attempted, not whether they are absolutely required. Rename to avoid
confusion in upcoming patches.

Related: OS#4830
Change-Id: I0ea90476470109134411255ffd1f11d88236c91b
This commit is contained in:
Neels Hofmeyr 2022-10-10 23:47:04 +02:00
parent 2ea7264b86
commit c48afa1416
2 changed files with 11 additions and 11 deletions

View File

@ -272,8 +272,8 @@ static void _proc_arq_vlr_node2_post_ciph(struct osmo_fsm_inst *fi)
_proc_arq_vlr_node2_post_vlr(fi);
}
/* Determine if sending of CMC/SMC is required */
static bool is_cmc_smc_required(struct proc_arq_priv *par)
/* Return true when CipherModeCmd / SecurityModeCmd should be attempted. */
static bool is_cmc_smc_to_be_attempted(struct proc_arq_priv *par)
{
/* UTRAN: always send SecModeCmd, even if ciphering is not required.
* GERAN: avoid sending CiphModeCmd if ciphering is not required. */
@ -288,7 +288,7 @@ static void _proc_arq_vlr_node2(struct osmo_fsm_inst *fi)
LOGPFSM(fi, "%s()\n", __func__);
if (!is_cmc_smc_required(par)) {
if (!is_cmc_smc_to_be_attempted(par)) {
_proc_arq_vlr_node2_post_ciph(fi);
return;
}
@ -319,7 +319,7 @@ static void _proc_arq_vlr_node2(struct osmo_fsm_inst *fi)
osmo_fsm_inst_state_chg(fi, PR_ARQ_S_WAIT_CIPH, 0, 0);
}
static bool is_auth_required(struct proc_arq_priv *par)
static bool is_auth_to_be_attempted(struct proc_arq_priv *par)
{
/* The cases where the authentication procedure should be used
* are defined in 3GPP TS 33.102 */
@ -339,7 +339,7 @@ static void proc_arq_vlr_fn_post_imsi(struct osmo_fsm_inst *fi)
OSMO_ASSERT(vsub);
/* TODO: Identity IMEI -> System Failure */
if (is_auth_required(par)) {
if (is_auth_to_be_attempted(par)) {
osmo_fsm_inst_state_chg(fi, PR_ARQ_S_WAIT_AUTH,
0, 0);
vsub->auth_fsm = auth_fsm_start(vsub, fi,

View File

@ -697,8 +697,8 @@ static bool lai_in_this_vlr(struct vlr_instance *vlr,
return true;
}
/* Determine if authentication is required */
static bool is_auth_required(struct lu_fsm_priv *lfp)
/* Return true when authentication should be attempted. */
static bool try_auth(struct lu_fsm_priv *lfp)
{
/* The cases where the authentication procedure should be used
* are defined in 3GPP TS 33.102 */
@ -707,8 +707,8 @@ static bool is_auth_required(struct lu_fsm_priv *lfp)
(lfp->is_ciphering_to_be_attempted && !auth_try_reuse_tuple(lfp->vsub, lfp->key_seq));
}
/* Determine if sending of CMC/SMC is required */
static bool is_cmc_smc_required(struct lu_fsm_priv *lfp)
/* Return true when CipherModeCmd / SecurityModeCmd should be attempted. */
static bool is_cmc_smc_to_be_attempted(struct lu_fsm_priv *lfp)
{
/* UTRAN: always send SecModeCmd, even if ciphering is not required.
* GERAN: avoid sending CiphModeCmd if ciphering is not required. */
@ -860,7 +860,7 @@ static void vlr_loc_upd_post_auth(struct osmo_fsm_inst *fi)
OSMO_ASSERT(vsub);
if (!is_cmc_smc_required(lfp)) {
if (!is_cmc_smc_to_be_attempted(lfp)) {
vlr_loc_upd_post_ciph(fi);
return;
}
@ -905,7 +905,7 @@ static void vlr_loc_upd_node1(struct osmo_fsm_inst *fi)
OSMO_ASSERT(vsub);
if (is_auth_required(lfp)) {
if (try_auth(lfp)) {
/* Authenticate_VLR */
osmo_fsm_inst_state_chg(fi, VLR_ULA_S_WAIT_AUTH,
LU_TIMEOUT_LONG, 0);