From 0cbfacfc41843ba749f0b3e1e791c06a38603294 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Thu, 22 Feb 2018 06:10:45 +0100 Subject: try to record subsrc on l3-compl Change-Id: I3b696a0c0932e3abcb682ba231db65755d8c27a6 --- src/osmo-bsc/osmo_bsc_api.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c index 239bb543c..f3b120e70 100644 --- a/src/osmo-bsc/osmo_bsc_api.c +++ b/src/osmo-bsc/osmo_bsc_api.c @@ -24,6 +24,7 @@ #include #include +#include #include #include @@ -261,8 +262,18 @@ static int complete_layer3(struct gsm_subscriber_connection *conn, return BSC_API_CONN_POL_REJECT; } - if (imsi) + if (imsi) { conn->filter_state.imsi = talloc_steal(conn, imsi); + if (conn->bsub) { + if (conn->bsub->imsi[0] + && strcmp(conn->bsub->imsi, imsi)) + LOGP(DMSC, LOGL_ERROR, "Subscriber's IMSI changes from %s to %s\n", + conn->bsub->imsi, imsi); + bsc_subscr_set_imsi(conn->bsub, imsi); + } else + conn->bsub = bsc_subscr_find_or_create_by_imsi(msc->network->bsc_subscribers, + imsi); + } conn->filter_state.con_type = con_type; /* check return value, if failed check msg for and send USSD */ -- cgit v1.2.3