Change in osmo-msc[master]: libvlr: vlr_set_ciph_mode(): avoid redundant check

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Sun Nov 28 16:56:26 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/26405 )


Change subject: libvlr: vlr_set_ciph_mode(): avoid redundant check
......................................................................

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
---
M include/osmocom/msc/vlr.h
M src/libvlr/vlr.c
M src/libvlr/vlr_access_req_fsm.c
M src/libvlr/vlr_lu_fsm.c
4 files changed, 0 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/05/26405/1

diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h
index f12e906..d752dfb 100644
--- a/include/osmocom/msc/vlr.h
+++ b/include/osmocom/msc/vlr.h
@@ -472,7 +472,6 @@
 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);
 
diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c
index 23bd671..fc23b37 100644
--- a/src/libvlr/vlr.c
+++ b/src/libvlr/vlr.c
@@ -1382,13 +1382,9 @@
 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);
 }
diff --git a/src/libvlr/vlr_access_req_fsm.c b/src/libvlr/vlr_access_req_fsm.c
index b3660ff..b880fcf 100644
--- a/src/libvlr/vlr_access_req_fsm.c
+++ b/src/libvlr/vlr_access_req_fsm.c
@@ -299,7 +299,6 @@
 	}
 
 	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,
diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c
index 53e614d..41e5608 100644
--- a/src/libvlr/vlr_lu_fsm.c
+++ b/src/libvlr/vlr_lu_fsm.c
@@ -878,7 +878,6 @@
 	}
 
 	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,

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/26405
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I900ddd5f1882f8cee234ab1074adcf25830a092c
Gerrit-Change-Number: 26405
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211128/e8b94e56/attachment.htm>


More information about the gerrit-log mailing list