neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/29696 )
Change subject: vlr_lu_fsm: clarify naming of static functions ...................................................................... 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 --- M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c 2 files changed, 11 insertions(+), 11 deletions(-) Approvals: Jenkins Builder: Verified neels: Looks good to me, approved diff --git a/src/libvlr/vlr_access_req_fsm.c b/src/libvlr/vlr_access_req_fsm.c index af7ec74..5f4795f 100644 --- a/src/libvlr/vlr_access_req_fsm.c +++ b/src/libvlr/vlr_access_req_fsm.c @@ -272,8 +272,8 @@ _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 @@ 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 @@ 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 @@ 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, diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c index 22875cf..224dd9f 100644 --- a/src/libvlr/vlr_lu_fsm.c +++ b/src/libvlr/vlr_lu_fsm.c @@ -697,8 +697,8 @@ 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 @@ (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 @@ 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 @@ 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); -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/29696 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I0ea90476470109134411255ffd1f11d88236c91b Gerrit-Change-Number: 29696 Gerrit-PatchSet: 4 Gerrit-Owner: neels <nhofm...@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <lafo...@osmocom.org> Gerrit-Reviewer: neels <nhofm...@sysmocom.de> Gerrit-CC: pespin <pes...@sysmocom.de> Gerrit-MessageType: merged