Change in osmo-bsc[master]: bsc: bssap: Set subscr log context during paging

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Wed Dec 12 00:08:14 UTC 2018


Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/12256 )

Change subject: bsc: bssap: Set subscr log context during paging
......................................................................

bsc: bssap: Set subscr log context during paging

Change-Id: I3998a35ff6ea29440882514bbb30cafed66f03fa
---
M src/osmo-bsc/osmo_bsc_bssap.c
1 file changed, 8 insertions(+), 2 deletions(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index b5ff152..60ec5fb 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -96,11 +96,15 @@
 	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 @@
 
 	/* the paging code has grabbed its own references */
 	bsc_subscr_put(subscr);
+
+	log_set_context(LOG_CTX_BSC_SUBSCR, NULL);
 }
 
 static void

-- 
To view, visit https://gerrit.osmocom.org/12256
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I3998a35ff6ea29440882514bbb30cafed66f03fa
Gerrit-Change-Number: 12256
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-CC: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181212/c4dd5c35/attachment.htm>


More information about the gerrit-log mailing list