Change in osmo-msc[master]: add vlr_subscr_find_by_mi

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

laforge gerrit-no-reply at
Mon Aug 2 09:15:45 UTC 2021

laforge has submitted this change. ( )

Change subject: add vlr_subscr_find_by_mi

add vlr_subscr_find_by_mi

Will be used by I6fa37d6ca9fcb1637742b40e37b68d67664c9b60
"implement CM Re-Establish for voice calls"

Related: SYS#5130
Change-Id: I5291d098a02268bd1c2e30195ae61e4a13e8709c
M include/osmocom/msc/vlr.h
M src/libvlr/vlr.c
2 files changed, 23 insertions(+), 0 deletions(-)

  Jenkins Builder: Verified
  osmith: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve

diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h
index 6e65283..3273333 100644
--- a/include/osmocom/msc/vlr.h
+++ b/include/osmocom/msc/vlr.h
@@ -358,6 +358,9 @@
 #define vlr_subscr_find_by_msisdn(vlr, msisdn, USE) \
 	_vlr_subscr_find_by_msisdn(vlr, msisdn, USE, __FILE__, __LINE__)
+#define vlr_subscr_find_by_mi(vlr, mi, USE) \
+	_vlr_subscr_find_by_mi(vlr, mi, USE, __FILE__, __LINE__)
 struct vlr_subscr *_vlr_subscr_find_by_imsi(struct vlr_instance *vlr,
 					    const char *imsi,
 					    const char *use,
@@ -385,6 +388,11 @@
 					      const char *use,
 					      const char *file, int line);
+struct vlr_subscr *_vlr_subscr_find_by_mi(struct vlr_instance *vlr,
+					  const struct osmo_mobile_identity *mi,
+					  const char *use,
+					  const char *file, int line);
 #define vlr_subscr_get(VSUB, USE) vlr_subscr_get_src(VSUB, USE, __FILE__, __LINE__)
 #define vlr_subscr_put(VSUB, USE) vlr_subscr_put_src(VSUB, USE, __FILE__, __LINE__)
diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c
index 02aceef..23bd671 100644
--- a/src/libvlr/vlr.c
+++ b/src/libvlr/vlr.c
@@ -188,6 +188,21 @@
 	return NULL;
+struct vlr_subscr *_vlr_subscr_find_by_mi(struct vlr_instance *vlr,
+					  const struct osmo_mobile_identity *mi,
+					  const char *use,
+					  const char *file, int line)
+	switch (mi->type) {
+		return _vlr_subscr_find_by_imsi(vlr, mi->imsi, use, file, line);
+		return _vlr_subscr_find_by_tmsi(vlr, mi->tmsi, use, file, line);
+	default:
+		return NULL;
+	}
 /* Transmit GSUP message for subscriber to HLR, using IMSI from subscriber */
 static int vlr_subscr_tx_gsup_message(const struct vlr_subscr *vsub,
 				      struct osmo_gsup_message *gsup_msg)

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I5291d098a02268bd1c2e30195ae61e4a13e8709c
Gerrit-Change-Number: 25075
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at>
Gerrit-Reviewer: laforge <laforge at>
Gerrit-Reviewer: osmith <osmith at>
Gerrit-Reviewer: pespin <pespin at>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list