diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2009-08-22 11:18:13 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2009-09-28 12:50:45 +0200 |
commit | 9f16a869a514500b9ede709334d67a173d59b174 (patch) | |
tree | 66ee25ac0d8f76a546f8b315721278add1babb71 | |
parent | 049935b9ccf15ec2a4762d58589e7e79bd3432fb (diff) |
[subscr] subscr_paging_cb is called for expire and success
Gracefully handle a case where success and expire could fire... I'm
only hitting this when doing something evil to simulate network code
but it seems appropriate to handle this gracefully.
-rw-r--r-- | openbsc/src/gsm_subscriber_base.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openbsc/src/gsm_subscriber_base.c b/openbsc/src/gsm_subscriber_base.c index 54db44774..868b35599 100644 --- a/openbsc/src/gsm_subscriber_base.c +++ b/openbsc/src/gsm_subscriber_base.c @@ -73,7 +73,9 @@ static int subscr_paging_cb(unsigned int hooknum, unsigned int event, struct subscr_request *request; struct gsm_subscriber *subscr = (struct gsm_subscriber *)param; - assert(!llist_empty(&subscr->requests)); + /* There is no request anymore... */ + if (llist_empty(&subscr->requests)) + return -1; /* * FIXME: What to do with paging requests coming during |