add vlr_subscr_find_by_mi

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

Related: SYS#5130
Change-Id: I5291d098a02268bd1c2e30195ae61e4a13e8709c
changes/75/25075/3
Neels Hofmeyr 1 year ago
parent 0c076bc75a
commit 5bdba0d48d
  1. 8
      include/osmocom/msc/vlr.h
  2. 15
      src/libvlr/vlr.c

@ -358,6 +358,9 @@ const char *vlr_subscr_msisdn_or_name(const struct vlr_subscr *vsub);
#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 @@ struct vlr_subscr *_vlr_subscr_find_by_msisdn(struct vlr_instance *vlr,
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__)

@ -188,6 +188,21 @@ struct vlr_subscr *_vlr_subscr_find_by_msisdn(struct vlr_instance *vlr,
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)

Loading…
Cancel
Save