aboutsummaryrefslogtreecommitdiffstats
path: root/src/paging.c
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2009-01-27 23:46:19 +0000
committerHolger Freyther <zecke@selfish.org>2009-01-27 23:46:19 +0000
commitbf83481799904526d1ecd9bac917dbf333ebd6ac (patch)
tree14556c9573bfb2f1fad9559c09453600ec394f00 /src/paging.c
parent1525de0c8f5540dd4ca8456840c7c05ed82d8786 (diff)
[paging] Discard paging requests after not completing them...
Diffstat (limited to 'src/paging.c')
-rw-r--r--src/paging.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/paging.c b/src/paging.c
index ec4b180d9..010df1b61 100644
--- a/src/paging.c
+++ b/src/paging.c
@@ -78,15 +78,20 @@ static void page_handle_pending_requests(void *data) {
/* handle the paging request now */
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);
mi_len = generate_mid_from_tmsi(mi, tmsi);
rsl_paging_cmd(paging_bts->bts, 1, mi_len, mi, RSL_CHANNEED_TCH_F);
- /* move to the next item */
- paging_bts->last_request =
- (struct paging_request *)paging_bts->last_request->entry.next;
- if (&paging_bts->last_request->entry == &paging_bts->pending_requests)
- paging_bts->last_request = NULL;
+ if (paging_bts->last_request->requests > 1500) {
+ page_remove_request(paging_bts);
+ } else {
+ /* move to the next item */
+ paging_bts->last_request =
+ (struct paging_request *)paging_bts->last_request->entry.next;
+ if (&paging_bts->last_request->entry == &paging_bts->pending_requests)
+ paging_bts->last_request = NULL;
+ }
schedule_timer(&paging_bts->page_timer, PAGING_TIMEOUT);
}