diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-12-28 17:47:43 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-01-06 14:52:52 +0100 |
commit | ffccb77df0b60574fb4c348793cb4ecdda5ebc94 (patch) | |
tree | 2328653f51198e90cccbf3635befd544506fabd5 | |
parent | f72b3d51fc2843156b47fce2edb772549c05d324 (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.
-rw-r--r-- | openbsc/src/gsm_subscriber.c | 13 | ||||
-rw-r--r-- | openbsc/tests/channel/channel_test.c | 1 |
2 files changed, 13 insertions, 1 deletions
diff --git a/openbsc/src/gsm_subscriber.c b/openbsc/src/gsm_subscriber.c index 3e3e74a2b..13260216e 100644 --- a/openbsc/src/gsm_subscriber.c +++ b/openbsc/src/gsm_subscriber.c @@ -103,8 +103,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); diff --git a/openbsc/tests/channel/channel_test.c b/openbsc/tests/channel/channel_test.c index a924e5b81..a63d8a56c 100644 --- a/openbsc/tests/channel/channel_test.c +++ b/openbsc/tests/channel/channel_test.c @@ -77,6 +77,7 @@ void input_event() {} void sms_alloc() {} void gsm_net_update_ctype(struct gsm_network *network) {} void gsm48_secure_channel() {} +void paging_request_stop() {} struct tlv_definition nm_att_tlvdef; |