logging: Only compare the subscr address
Move the "logging filter imsi IMSI" into the BTS/NITB code to
allow to set the gsm_subscriber and only compare it. This way
we simply compare the subscriber address and don't have to care
if the subscriber data is still valid.
diff --git a/openbsc/src/libbsc/paging.c b/openbsc/src/libbsc/paging.c
index 18bb3fe..2d08af7 100644
--- a/openbsc/src/libbsc/paging.c
+++ b/openbsc/src/libbsc/paging.c
@@ -250,12 +250,11 @@
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);
+ log_set_context(BSC_CTX_SUBSCR, req->subscr);
LOGP(DPAG, LOGL_INFO, "T3113 expired for request %p (%s)\n",
req, req->subscr->imsi);
@@ -275,8 +274,6 @@
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,