summaryrefslogtreecommitdiffstats
path: root/src/gb
diff options
context:
space:
mode:
Diffstat (limited to 'src/gb')
-rw-r--r--src/gb/gprs_bssgp.c3
-rw-r--r--src/gb/gprs_ns.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c
index dba4d5ca..fdbf7884 100644
--- a/src/gb/gprs_bssgp.c
+++ b/src/gb/gprs_bssgp.c
@@ -640,8 +640,7 @@ static int fc_queue_timer_cfg(struct bssgp_flow_control *fc)
msecs = (fcqe->llc_pdu_len * 1000) / fc->bucket_leak_rate;
/* FIXME: add that time to fc->time_last_pdu and subtract it from
* current time */
- fc->timer.data = fc;
- fc->timer.cb = &fc_timer_cb;
+ osmo_timer_setup(&fc->timer, fc_timer_cb, fc);
osmo_timer_schedule(&fc->timer, msecs / 1000, (msecs % 1000) * 1000);
} else {
/* If the PCU is telling us to not send any more data at all,
diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c
index 7b497c2e..9a2a114f 100644
--- a/src/gb/gprs_ns.c
+++ b/src/gb/gprs_ns.c
@@ -238,8 +238,7 @@ struct gprs_nsvc *gprs_nsvc_create(struct gprs_ns_inst *nsi, uint16_t nsvci)
/* before RESET procedure: BLOCKED and DEAD */
nsvc->state = NSE_S_BLOCKED;
nsvc->nsi = nsi;
- nsvc->timer.cb = gprs_ns_timer_cb;
- nsvc->timer.data = nsvc;
+ osmo_timer_setup(&nsvc->timer, gprs_ns_timer_cb, nsvc);
nsvc->ctrg = rate_ctr_group_alloc(nsvc, &nsvc_ctrg_desc, nsvci);
nsvc->statg = osmo_stat_item_group_alloc(nsvc, &nsvc_statg_desc, nsvci);