aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-02-22 06:10:45 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-05-03 15:26:32 +0200
commit0cbfacfc41843ba749f0b3e1e791c06a38603294 (patch)
tree96fcce44523b5e6168c24e95a9f94bdda5078223
parentddc9c914d04607ee161d5185377915798ecba591 (diff)
try to record subsrc on l3-compl
-rw-r--r--src/osmo-bsc/osmo_bsc_api.c13
1 files changed, 12 insertions, 1 deletions
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 <osmocom/bsc/gsm_04_80.h>
#include <osmocom/bsc/gsm_04_08_utils.h>
+#include <osmocom/bsc/bsc_subscriber.h>
#include <osmocom/gsm/protocol/gsm_08_08.h>
#include <osmocom/gsm/gsm0808.h>
@@ -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 */