aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/gsm_subscriber.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/libmsc/gsm_subscriber.c')
-rw-r--r--openbsc/src/libmsc/gsm_subscriber.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/openbsc/src/libmsc/gsm_subscriber.c b/openbsc/src/libmsc/gsm_subscriber.c
index ff77aa5cf..ccba360b0 100644
--- a/openbsc/src/libmsc/gsm_subscriber.c
+++ b/openbsc/src/libmsc/gsm_subscriber.c
@@ -99,6 +99,14 @@ static int subscr_paging_dispatch(unsigned int hooknum, unsigned int event,
return 0;
}
+ /*
+ * Stop paging on all other BTS. E.g. if this is
+ * the first timeout on a BTS then the others will
+ * timeout soon as well. Let's just stop everything
+ * and forget we wanted to page.
+ */
+ paging_request_stop(NULL, subscr, NULL, NULL);
+
/* Inform parts of the system we don't know */
sig_data.subscr = subscr;
sig_data.bts = conn ? conn->bts : NULL;
@@ -111,15 +119,6 @@ static int subscr_paging_dispatch(unsigned int hooknum, unsigned int event,
&sig_data
);
- /*
- * Stop paging on all other BTS. E.g. if this is
- * the first timeout on a BTS then the others will
- * timeout soon as well. Let's just stop everything
- * and forget we wanted to page.
- */
- paging_request_stop(NULL, subscr, NULL, NULL);
- subscr->is_paging = 0;
-
llist_for_each_entry_safe(request, tmp, &subscr->requests, entry) {
llist_del(&request->entry);
request->cbfn(hooknum, event, msg, data, request->param);
@@ -127,6 +126,7 @@ static int subscr_paging_dispatch(unsigned int hooknum, unsigned int event,
}
/* balanced with the moment we start paging */
+ subscr->is_paging = 0;
subscr_put(subscr);
return 0;
}
@@ -368,6 +368,7 @@ static void subscr_expire_callback(void *data, long long unsigned int id)
LOGP(DMM, LOGL_DEBUG, "Not expiring subscriber %s (ID %llu)\n",
subscr_name(s), id);
subscr_update_expire_lu(s, conn->bts);
+ subscr_put(s);
return;
}