aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-12-11 16:27:48 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2018-12-11 17:02:15 +0100
commit4e13309104eee3f41f38fa485dd45dfa406bf64d (patch)
treeb37f5be32ba8d676ab4ffc318620db5531ed38a8
parent26da3291d4c1d6b2131bf4d4b73695aac089fe89 (diff)
bsc: rsl: Set subscr log context during meas report
-rw-r--r--src/osmo-bsc/abis_rsl.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 954fb0f..8ffb07e 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -917,11 +917,14 @@ static void print_meas_rep(struct gsm_lchan *lchan, struct gsm_meas_rep *mr)
{
int i;
const char *name = "";
+ struct bsc_subscr *bsub = NULL;
if (lchan && lchan->conn) {
- if (lchan->conn->bsub)
- name = bsc_subscr_name(lchan->conn->bsub);
- else
+ bsub = lchan->conn->bsub;
+ if (bsub) {
+ log_set_context(LOG_CTX_BSC_SUBSCR, bsub);
+ name = bsc_subscr_name(bsub);
+ } else
name = lchan->name;
}
@@ -960,6 +963,9 @@ static void print_meas_rep(struct gsm_lchan *lchan, struct gsm_meas_rep *mr)
DEBUGP(DMEAS, "IDX=%u ARFCN=%u BSIC=%u => %d dBm\n",
mrc->neigh_idx, mrc->arfcn, mrc->bsic, rxlev2dbm(mrc->rxlev));
}
+
+ if (bsub)
+ log_set_context(LOG_CTX_BSC_SUBSCR, NULL);
}
static struct gsm_meas_rep *lchan_next_meas_rep(struct gsm_lchan *lchan)