From 0abaf33297d79af507c82a2dcafaa83bcb9b54ae Mon Sep 17 00:00:00 2001 From: "Harald Welte (local)" Date: Sat, 15 Aug 2009 11:25:45 +0200 Subject: paging_request() now returns the number of started paging requests this helps the caller to determine if he will ever get called back or not (and if he should free his data structures now or not) --- openbsc/src/paging.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'openbsc/src/paging.c') diff --git a/openbsc/src/paging.c b/openbsc/src/paging.c index f7ee81d24..87c5a5407 100644 --- a/openbsc/src/paging.c +++ b/openbsc/src/paging.c @@ -247,13 +247,16 @@ int paging_request(struct gsm_network *network, struct gsm_subscriber *subscr, int type, gsm_cbfn *cbfn, void *data) { struct gsm_bts *bts = NULL; - int rc; + int num_pages = 0; /* start paging subscriber on all BTS within Location Area */ do { + int rc; + bts = gsm_bts_by_lac(network, subscr->lac, bts); if (!bts) break; + num_pages++; /* Trigger paging, pass any error to caller */ rc = _paging_request(bts, subscr, type, cbfn, data); @@ -261,7 +264,7 @@ int paging_request(struct gsm_network *network, struct gsm_subscriber *subscr, return rc; } while (1); - return 0; + return num_pages; } -- cgit v1.2.3