aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-12-28 17:47:43 +0100
committerHarald Welte <laforge@gnumonks.org>2010-12-28 18:06:02 +0100
commitff3aa71b66ef7e6381222f4cedd2cb2f7bff3d5c (patch)
treec2576c56e85d3c206fb0e45746819c339dc00adc /openbsc/src
parentdcda257dd232cb9d0f9714a4ea56c157f3ae17a7 (diff)
subscr: Stop all paging requests if one is failing.
If one paging request is timing out the others will timeout soon as well. With the current code the next timeout would expire the next request in the queue. We will now stop all paging requests and then issue a next paging request. So for both paging success and failure we will now stop all the other requests. This is mostly a workaround, one should count on how many BTSes we are paging and wait for all failures before we remove the item from the queue.
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/gsm_subscriber.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/openbsc/src/gsm_subscriber.c b/openbsc/src/gsm_subscriber.c
index c672e9f7d..66b969d1f 100644
--- a/openbsc/src/gsm_subscriber.c
+++ b/openbsc/src/gsm_subscriber.c
@@ -104,8 +104,19 @@ static int subscr_paging_dispatch(unsigned int hooknum, unsigned int event,
request->cbfn(hooknum, event, msg, data, request->param);
subscr->in_callback = 0;
- if (event != GSM_PAGING_SUCCEEDED)
+ if (event != GSM_PAGING_SUCCEEDED) {
+ /*
+ * This is a workaround for a bigger issue. We have
+ * issued paging that might involve multiple BTSes
+ * and one of them have failed now. We will stop the
+ * other paging requests as well as the next timeout
+ * would work on the next paging request and the queue
+ * will do bad things. This should be fixed by counting
+ * the outstanding results.
+ */
+ paging_request_stop(NULL, subscr, NULL, NULL);
subscr_put_channel(subscr);
+ }
subscr_put(subscr);
talloc_free(request);