aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-02-22 06:10:45 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-04-15 23:15:53 +0200
commitf21d222c66ff57aedb7156a45d2716f4f0ef8918 (patch)
treec4691f687245038afb9e19a44dab1a81e887fedc
parentf606714691c5cf6ef801436a800e9c606d7f005b (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 */