libvlr: vlr_set_ciph_mode(): avoid redundant check

This function is never called when ciph_required is false, so
there is no need for an additional check in this function.

Change-Id: I900ddd5f1882f8cee234ab1074adcf25830a092c
changes/05/26405/2
Vadim Yanitskiy 1 year ago committed by fixeria
parent 6d594e4e83
commit f4b87fa83c
  1. 1
      include/osmocom/msc/vlr.h
  2. 4
      src/libvlr/vlr.c
  3. 1
      src/libvlr/vlr_access_req_fsm.c
  4. 1
      src/libvlr/vlr_lu_fsm.c

@ -472,7 +472,6 @@ void vlr_parq_fsm_init(void);
int vlr_set_ciph_mode(struct vlr_instance *vlr,
struct osmo_fsm_inst *fi,
void *msc_conn_ref,
bool ciph_required,
bool umts_aka,
bool retrieve_imeisv);

@ -1382,13 +1382,9 @@ void vlr_subscr_rx_ciph_res(struct vlr_subscr *vsub, enum vlr_ciph_result_cause
int vlr_set_ciph_mode(struct vlr_instance *vlr,
struct osmo_fsm_inst *fi,
void *msc_conn_ref,
bool ciph_required,
bool umts_aka,
bool retrieve_imeisv)
{
if (!ciph_required)
return 0;
LOGPFSML(fi, LOGL_DEBUG, "Set Ciphering Mode\n");
return vlr->ops.set_ciph_mode(msc_conn_ref, umts_aka, retrieve_imeisv);
}

@ -299,7 +299,6 @@ static void _proc_arq_vlr_node2(struct osmo_fsm_inst *fi)
}
if (vlr_set_ciph_mode(vsub->vlr, fi, par->msc_conn_ref,
par->ciphering_required,
umts_aka,
vsub->vlr->cfg.retrieve_imeisv_ciphered)) {
LOGPFSML(fi, LOGL_ERROR,

@ -878,7 +878,6 @@ static void vlr_loc_upd_post_auth(struct osmo_fsm_inst *fi)
}
if (vlr_set_ciph_mode(vsub->vlr, fi, lfp->msc_conn_ref,
lfp->ciphering_required,
umts_aka,
vsub->vlr->cfg.retrieve_imeisv_ciphered)) {
LOGPFSML(fi, LOGL_ERROR,

Loading…
Cancel
Save