aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-12-11 17:25:54 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2018-12-12 00:58:40 +0100
commit1aea16f54f4fea5ca8037e3868c01fac0cf6ca06 (patch)
tree47e424822bbb3fca3ce1d029821ca64ab827da24
parentd5c7582f72cea950508b6084ae7887fe4998e889 (diff)
bsc: bssap: Set subscr log context during paging
-rw-r--r--src/osmo-bsc/osmo_bsc_bssap.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index b5ff152b8..60ec5fbf2 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -96,11 +96,15 @@ page_subscriber(struct bsc_msc_data *msc, struct gsm_bts *bts,
struct bsc_subscr *subscr;
int ret;
+ subscr = bsc_subscr_find_or_create_by_imsi(msc->network->bsc_subscribers,
+ mi_string);
+
+ if (subscr)
+ log_set_context(LOG_CTX_BSC_SUBSCR, subscr);
+
LOGP(DMSC, LOGL_INFO, "Paging request from MSC BTS: %d IMSI: '%s' TMSI: '0x%x/%u' LAC: 0x%x\n",
bts->nr, mi_string, tmsi, tmsi, lac);
- subscr = bsc_subscr_find_or_create_by_imsi(msc->network->bsc_subscribers,
- mi_string);
if (!subscr) {
LOGP(DMSC, LOGL_ERROR, "Paging request failed: Could not allocate subscriber for %s\n", mi_string);
return;
@@ -116,6 +120,8 @@ page_subscriber(struct bsc_msc_data *msc, struct gsm_bts *bts,
/* the paging code has grabbed its own references */
bsc_subscr_put(subscr);
+
+ log_set_context(LOG_CTX_BSC_SUBSCR, NULL);
}
static void