diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2009-08-21 02:35:28 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2009-09-28 06:04:40 +0200 |
commit | 049935b9ccf15ec2a4762d58589e7e79bd3432fb (patch) | |
tree | 0374dc2a6cea0a117856dba624427e0ef2729ddb /openbsc | |
parent | c4a49e3e2dca893e52f9432b378fae645386575e (diff) |
[subscr] When paging fails to start, send an expired event
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/src/gsm_subscriber_base.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/openbsc/src/gsm_subscriber_base.c b/openbsc/src/gsm_subscriber_base.c index 345544d49..54db44774 100644 --- a/openbsc/src/gsm_subscriber_base.c +++ b/openbsc/src/gsm_subscriber_base.c @@ -94,11 +94,19 @@ static int subscr_paging_cb(unsigned int hooknum, unsigned int event, static void subscr_send_paging_request(struct gsm_subscriber *subscr) { struct subscr_request *request; + int rc; + assert(!llist_empty(&subscr->requests)); request = (struct subscr_request *)subscr->requests.next; - paging_request(subscr->net, subscr, request->channel_type, - subscr_paging_cb, subscr); + rc = paging_request(subscr->net, subscr, request->channel_type, + subscr_paging_cb, subscr); + + /* paging failed, quit now */ + if (rc <= 0) { + subscr_paging_cb(GSM_HOOK_RR_PAGING, GSM_PAGING_EXPIRED, + NULL, NULL, request->param); + } } struct gsm_subscriber *subscr_alloc(void) |