src: use osmo_timer_setup()
Use new function available in libosmocore to set up timers. Compile
tested only.
Change-Id: Ibcfd915688e97d370a888888a83a7c95cbe16819
diff --git a/openbsc/src/libbsc/paging.c b/openbsc/src/libbsc/paging.c
index bd23d89..78e39c5 100644
--- a/openbsc/src/libbsc/paging.c
+++ b/openbsc/src/libbsc/paging.c
@@ -188,8 +188,8 @@
* to zero and we do not get any messages.
*/
if (paging_bts->available_slots == 0) {
- paging_bts->credit_timer.cb = paging_give_credit;
- paging_bts->credit_timer.data = paging_bts;
+ osmo_timer_setup(&paging_bts->credit_timer, paging_give_credit,
+ paging_bts);
osmo_timer_schedule(&paging_bts->credit_timer, 5, 0);
return;
}
@@ -230,8 +230,8 @@
bts->paging.bts = bts;
INIT_LLIST_HEAD(&bts->paging.pending_requests);
- bts->paging.work_timer.cb = paging_worker;
- bts->paging.work_timer.data = &bts->paging;
+ osmo_timer_setup(&bts->paging.work_timer, paging_worker,
+ &bts->paging);
/* Large number, until we get a proper message */
bts->paging.available_slots = 20;
@@ -299,8 +299,7 @@
req->chan_type = type;
req->cbfn = cbfn;
req->cbfn_param = data;
- req->T3113.cb = paging_T3113_expired;
- req->T3113.data = req;
+ osmo_timer_setup(&req->T3113, paging_T3113_expired, req);
osmo_timer_schedule(&req->T3113, bts->network->T3113, 0);
llist_add_tail(&req->entry, &bts_entry->pending_requests);
paging_schedule_if_needed(bts_entry);