summaryrefslogtreecommitdiffstats
path: root/openbsc
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>2015-01-02 11:43:06 +0100
commitb7ccac4d620271e8780fdc7640cba96c275bdf85 (patch)
treee826686382efb3788eca48f007bad83196125d1e /openbsc
parent454140e7fcd9c904ffbdf5b16af84e52efe9b4d4 (diff)
logging: Set the context for paging requests as well.
Diffstat (limited to 'openbsc')
-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 ce87ca025..cd3db9c77 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);