summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-12-28 15:00:36 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-12-28 15:22:46 +0100
commit59a765d46f04cd22818d1624bda7000e26837fe9 (patch)
tree695b4025ac6f7645d0a278dab27407070f37cf44
parentdb81ad9d9fb04ef161351cabd79bca228a1ff78e (diff)
log: Set the context for paging requests as well.shared/31c3
-rw-r--r--openbsc/src/libbsc/paging.c11
-rw-r--r--openbsc/src/libmsc/gsm_04_08.c1
2 files changed, 12 insertions, 0 deletions
diff --git a/openbsc/src/libbsc/paging.c b/openbsc/src/libbsc/paging.c
index f0518bbcb..18bb3fe09 100644
--- a/openbsc/src/libbsc/paging.c
+++ b/openbsc/src/libbsc/paging.c
@@ -77,6 +77,8 @@ static void page_ms(struct gsm_paging_request *request)
if (!bts->oml_link)
return;
+ log_set_context(BSC_CTX_SUBSCR, request->subscr);
+
LOGP(DPAG, LOGL_INFO, "Going to send paging commands: imsi: '%s' tmsi: '0x%x'\n",
request->subscr->imsi, request->subscr->tmsi);
@@ -88,6 +90,7 @@ static void page_ms(struct gsm_paging_request *request)
page_group = gsm0502_calc_paging_group(&bts->si_common.chan_desc,
str_to_imsi(request->subscr->imsi));
gsm0808_page(bts, page_group, mi_len, mi, request->chan_type);
+ log_set_context(BSC_CTX_SUBSCR, NULL);
}
static void paging_schedule_if_needed(struct gsm_bts_paging_state *paging_bts)
@@ -247,10 +250,13 @@ static int paging_pending_request(struct gsm_bts_paging_state *bts,
static void paging_T3113_expired(void *data)
{
struct gsm_paging_request *req = (struct gsm_paging_request *)data;
+ struct gsm_subscriber *subscr = subscr_get(req->subscr);
void *cbfn_param;
gsm_cbfn *cbfn;
int msg;
+ log_set_context(BSC_CTX_SUBSCR, subscr);
+
LOGP(DPAG, LOGL_INFO, "T3113 expired for request %p (%s)\n",
req, req->subscr->imsi);
@@ -268,6 +274,9 @@ static void paging_T3113_expired(void *data)
if (cbfn)
cbfn(GSM_HOOK_RR_PAGING, msg, NULL, NULL,
cbfn_param);
+
+ log_set_context(BSC_CTX_SUBSCR, NULL);
+ subscr_put(subscr);
}
static int _paging_request(struct gsm_bts *bts, struct gsm_subscriber *subscr,
@@ -379,6 +388,8 @@ void paging_request_stop(struct gsm_bts *_bts, struct gsm_subscriber *subscr,
{
struct gsm_bts *bts = NULL;
+ log_set_context(BSC_CTX_SUBSCR, subscr);
+
if (_bts)
_paging_request_stop(_bts, subscr, conn, msg);
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index ac1e9169e..5dd3b6b2f 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -1163,6 +1163,7 @@ static int gsm48_rx_rr_pag_resp(struct gsm_subscriber_connection *conn, struct m
/* FIXME: request id? close channel? */
return -EINVAL;
}
+ log_set_context(BSC_CTX_SUBSCR, subscr);
DEBUGP(DRR, "<- Channel was requested by %s\n",
subscr->name && strlen(subscr->name) ? subscr->name : subscr->imsi);