bsc: rsl: Set subscr log context during meas report

Change-Id: Idc6af592e870d15491797ae6fcaffaac2b411766
This commit is contained in:
Pau Espin 2018-12-11 16:27:48 +01:00
parent 26da3291d4
commit 4e13309104
1 changed files with 9 additions and 3 deletions

View File

@ -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)