aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/paging.c
diff options
context:
space:
mode:
authorHarald Welte (local) <laflocal@hanuman.gnumonks.org>2009-08-15 11:25:45 +0200
committerHarald Welte (local) <laflocal@hanuman.gnumonks.org>2009-08-15 11:25:45 +0200
commit0abaf33297d79af507c82a2dcafaa83bcb9b54ae (patch)
tree9e06db8f6c0377d28118ed6bcbe1625120a12386 /openbsc/src/paging.c
parent10250e657b4c96b7b1817b8e30c3a1de0f6ad018 (diff)
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)
Diffstat (limited to 'openbsc/src/paging.c')
-rw-r--r--openbsc/src/paging.c7
1 files changed, 5 insertions, 2 deletions
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;
}