aboutsummaryrefslogtreecommitdiffstats
path: root/src/paging.c
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2009-02-03 23:18:46 +0000
committerHolger Freyther <zecke@selfish.org>2009-02-03 23:18:46 +0000
commitd4ec5287c2f28f5cd2b78c6ad11b52d9d0fcc2cd (patch)
treef8eec650810fb686e27a5b3132ae0680260c80c6 /src/paging.c
parentdf892da697aa59ab64bb88555948afd1cb2cb472 (diff)
[paging] some minor cleanups. put the current request into a temporary
Diffstat (limited to 'src/paging.c')
-rw-r--r--src/paging.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/paging.c b/src/paging.c
index 6f21460c0..e580ac72f 100644
--- a/src/paging.c
+++ b/src/paging.c
@@ -43,7 +43,7 @@
#include <openbsc/abis_rsl.h>
#include <openbsc/gsm_04_08.h>
-#define PAGING_TIMEOUT 0, 75000
+#define PAGING_TIMEOUT 1, 75000
#define MAX_PAGING_REQUEST 750
static LLIST_HEAD(managed_bts);
@@ -67,6 +67,7 @@ static void page_handle_pending_requests(void *data) {
unsigned long int tmsi;
unsigned int mi_len;
struct paging_bts *paging_bts = (struct paging_bts *)data;
+ struct paging_request *request = NULL;
if (!paging_bts->last_request)
paging_bts->last_request =
@@ -77,14 +78,16 @@ static void page_handle_pending_requests(void *data) {
}
/* handle the paging request now */
+ request = paging_bts->last_request;
DEBUGP(DPAG, "Going to send paging commands: '%s'\n",
- paging_bts->last_request->subscr->imsi);
- ++paging_bts->last_request->requests;
- tmsi = strtoul(paging_bts->last_request->subscr->tmsi, NULL, 10);
+ request->subscr->imsi);
+ ++request->requests;
+ tmsi = strtoul(request->subscr->tmsi, NULL, 10);
mi_len = generate_mid_from_tmsi(mi, tmsi);
- rsl_paging_cmd(paging_bts->bts, 1, mi_len, mi, RSL_CHANNEED_TCH_F);
+ rsl_paging_cmd(paging_bts->bts, 1, mi_len, mi,
+ request->chan_type);
- if (paging_bts->last_request->requests > MAX_PAGING_REQUEST) {
+ if (request->requests > MAX_PAGING_REQUEST) {
page_remove_request(paging_bts);
} else {
/* move to the next item */