Change in osmo-msc[master]: add vlr_subscr_find_by_mi

laforge gerrit-no-reply at lists.osmocom.org
Mon Aug 2 09:15:45 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/25075 )

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(-)

Approvals:
  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) {
+	case GSM_MI_TYPE_IMSI:
+		return _vlr_subscr_find_by_imsi(vlr, mi->imsi, use, file, line);
+	case GSM_MI_TYPE_TMSI:
+		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 https://gerrit.osmocom.org/c/osmo-msc/+/25075
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I5291d098a02268bd1c2e30195ae61e4a13e8709c
Gerrit-Change-Number: 25075
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210802/7ff156c9/attachment.htm>


More information about the gerrit-log mailing list