aboutsummaryrefslogtreecommitdiffstats
path: root/src/paging.c
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2009-02-10 00:06:19 +0000
committerHolger Freyther <zecke@selfish.org>2009-02-10 00:06:19 +0000
commit392209cbb55ebaaa5d795e196198f16615c3d7e4 (patch)
tree37a5bb77eceb8ecb430a90bdbcf9b9a3356f1358 /src/paging.c
parent1fd34141c220fcc0c04029a2966ef486ed8cb6be (diff)
[paging] Introduce a variable containing the free paging slots
Start with a large number of available slots. It is guranteed that we will - at some point - get a paging load and will properly update the counter and keep it updated.
Diffstat (limited to 'src/paging.c')
-rw-r--r--src/paging.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/paging.c b/src/paging.c
index 482669052..55f6d810f 100644
--- a/src/paging.c
+++ b/src/paging.c
@@ -134,6 +134,9 @@ void paging_init(struct gsm_bts *bts)
INIT_LLIST_HEAD(&bts->paging.pending_requests);
bts->paging.paging_timer.cb = paging_handle_pending_requests;
bts->paging.paging_timer.data = &bts->paging;
+
+ /* Large number, until we get a proper message */
+ bts->paging.available_slots = 0xffff;
}
static int paging_pending_request(struct gsm_bts_paging_state *bts,
@@ -181,3 +184,8 @@ void paging_request_stop(struct gsm_bts *bts, struct gsm_subscriber *subscr)
}
}
}
+
+void paging_update_buffer_space(struct gsm_bts *bts, u_int16_t free_slots)
+{
+ bts->paging.available_slots = free_slots;
+}