neels has uploaded this change for review. ( 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(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/96/29696/1 diff --git a/src/libvlr/vlr_access_req_fsm.c b/src/libvlr/vlr_access_req_fsm.c index eeefc90..956b540 100644 --- a/src/libvlr/vlr_access_req_fsm.c +++ b/src/libvlr/vlr_access_req_fsm.c @@ -268,8 +268,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 try_cmc_smc(struct proc_arq_priv *par) { /* UTRAN: always send SecModeCmd, even if ciphering is not required. * GERAN: avoid sending CiphModeCmd if ciphering is not required. */ @@ -284,7 +284,7 @@ LOGPFSM(fi, "%s()\n", __func__); - if (!is_cmc_smc_required(par)) { + if (!try_cmc_smc(par)) { _proc_arq_vlr_node2_post_ciph(fi); return; } @@ -315,7 +315,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 try_auth(struct proc_arq_priv *par) { /* The cases where the authentication procedure should be used * are defined in 3GPP TS 33.102 */ @@ -335,7 +335,7 @@ OSMO_ASSERT(vsub); /* TODO: Identity IMEI -> System Failure */ - if (is_auth_required(par)) { + if (try_auth(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 e0c73a3..3c8072f 100644 --- a/src/libvlr/vlr_lu_fsm.c +++ b/src/libvlr/vlr_lu_fsm.c @@ -693,8 +693,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 */ @@ -703,8 +703,8 @@ (lfp->try_ciphering && !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 try_cmc_smc(struct lu_fsm_priv *lfp) { /* UTRAN: always send SecModeCmd, even if ciphering is not required. * GERAN: avoid sending CiphModeCmd if ciphering is not required. */ @@ -856,7 +856,7 @@ OSMO_ASSERT(vsub); - if (!is_cmc_smc_required(lfp)) { + if (!try_cmc_smc(lfp)) { vlr_loc_upd_post_ciph(fi); return; } @@ -901,7 +901,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: 1 Gerrit-Owner: neels <nhofm...@sysmocom.de> Gerrit-MessageType: newchange