aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/paging.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-01-07 17:30:13 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-01-28 15:41:27 +0100
commitdc030960fc729c3124c40838a733eab1bc9394b0 (patch)
treef9d4d99821a356169af7d2b8674cabcfd384dc56 /openbsc/src/libbsc/paging.c
parent3d119f1de474340bdfb98e237735e1a3170252cb (diff)
bsc: Allow to page a BTS that is excluded from the RF lock
The RF lock excluded BTS was not paged at all. Now forward the paging message to the handler and call a function that will check if this LAC can be paged right now. Introduce a new paging method that allows to page on a dedicated bts, refactor the code to use this method for paging.
Diffstat (limited to 'openbsc/src/libbsc/paging.c')
-rw-r--r--openbsc/src/libbsc/paging.c35
1 files changed, 23 insertions, 12 deletions
diff --git a/openbsc/src/libbsc/paging.c b/openbsc/src/libbsc/paging.c
index b731dbcfa..286c57ba9 100644
--- a/openbsc/src/libbsc/paging.c
+++ b/openbsc/src/libbsc/paging.c
@@ -1,5 +1,5 @@
/* Paging helper and manager.... */
-/* (C) 2009 by Holger Hans Peter Freyther <zecke@selfish.org>
+/* (C) 2009,2013 by Holger Hans Peter Freyther <zecke@selfish.org>
* All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -298,6 +298,26 @@ static int _paging_request(struct gsm_bts *bts, struct gsm_subscriber *subscr,
return 0;
}
+int paging_request_bts(struct gsm_bts *bts, struct gsm_subscriber *subscr,
+ int type, gsm_cbfn *cbfn, void *data)
+{
+ int rc;
+
+ /* skip all currently inactive TRX */
+ if (!trx_is_usable(bts->c0))
+ return 0;
+
+ /* maybe it is the first time we use it */
+ paging_init_if_needed(bts);
+
+
+ /* Trigger paging, pass any error to the caller */
+ rc = _paging_request(bts, subscr, type, cbfn, data);
+ if (rc < 0)
+ return rc;
+ return 1;
+}
+
int paging_request(struct gsm_network *network, struct gsm_subscriber *subscr,
int type, gsm_cbfn *cbfn, void *data)
{
@@ -314,19 +334,10 @@ int paging_request(struct gsm_network *network, struct gsm_subscriber *subscr,
if (!bts)
break;
- /* skip all currently inactive TRX */
- if (!trx_is_usable(bts->c0))
- continue;
-
- /* maybe it is the first time we use it */
- paging_init_if_needed(bts);
-
- num_pages++;
-
- /* Trigger paging, pass any error to caller */
- rc = _paging_request(bts, subscr, type, cbfn, data);
+ rc = paging_request_bts(bts, subscr, type, cbfn, data);
if (rc < 0)
return rc;
+ num_pages += rc;
} while (1);
if (num_pages == 0)