diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-08-08 20:44:42 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-08-08 20:44:42 +0200 |
commit | e019b564eccaf63ca372db6811dfa3dd6c4d9084 (patch) | |
tree | e5c1d729eb01e90f38f4a193e63602717595156b /openbsc/src/libmsc/gsm_subscriber.c | |
parent | daaea0c84fee46d9b63b746d5ed2cdf66f990352 (diff) | |
parent | eb48cafac9af84586679a4ce4caeb985ef0b1eb1 (diff) |
Merge branch 'zecke/changes/paging-order'
Various paging clean-ups. I couldn't re-produce the assert that
was hit by Rhizomatica in the subscriber code. Let's clean things
up a bit to avoid some of the potential issues this code had.
Always stop paging regardless of where the subscriber is at the
time of the cancellation.
Diffstat (limited to 'openbsc/src/libmsc/gsm_subscriber.c')
-rw-r--r-- | openbsc/src/libmsc/gsm_subscriber.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/openbsc/src/libmsc/gsm_subscriber.c b/openbsc/src/libmsc/gsm_subscriber.c index 4559de581..442e84c4c 100644 --- a/openbsc/src/libmsc/gsm_subscriber.c +++ b/openbsc/src/libmsc/gsm_subscriber.c @@ -84,6 +84,14 @@ static int subscr_paging_dispatch(unsigned int hooknum, unsigned int event, OSMO_ASSERT(subscr->is_paging); + /* + * 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; @@ -96,15 +104,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); @@ -112,6 +111,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; } |