Change in osmo-msc[master]: add vlr_subscr_find_by_mi

neels gerrit-no-reply at lists.osmocom.org
Tue Jul 27 23:18:22 UTC 2021


neels has uploaded this change for review. ( 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(-)



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

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: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210727/4647992d/attachment.htm>


More information about the gerrit-log mailing list