aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmux.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2017-06-07 18:38:21 +0200
committerPablo Neira Ayuso <pablo@gnumonks.org>2017-06-07 18:40:35 +0200
commit57b5f824911c0ba6b2a8e1fecaa4dc98ec4b21f6 (patch)
tree296092717e94f1de6d6b7e45f9ccbc13cf645c7f /src/osmux.c
parent31b1dbd894d6c4b1f1abf38b2816cca920e894f9 (diff)
src: use osmo_timer_setup()
Use new function available in libosmocore to set up timers. Compile tested only. Change-Id: Id3dd32102c7362f3b280d2c058c2decebccb357a
Diffstat (limited to 'src/osmux.c')
-rw-r--r--src/osmux.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/osmux.c b/src/osmux.c
index 91054f1..23a6440 100644
--- a/src/osmux.c
+++ b/src/osmux.c
@@ -721,8 +721,7 @@ void osmux_xfrm_input_init(struct osmux_in_handle *h)
INIT_LLIST_HEAD(&batch->circuit_list);
batch->remaining_bytes = h->batch_size;
- batch->timer.cb = osmux_batch_timer_expired;
- batch->timer.data = h;
+ osmo_timer_setup(&batch->timer, osmux_batch_timer_expired, h);
h->internal_data = (void *)batch;
@@ -803,8 +802,7 @@ osmux_tx(struct msgb *msg, struct timeval *when,
h->msg = msg;
h->tx_cb = tx_cb;
h->data = data;
- h->timer.cb = osmux_tx_cb;
- h->timer.data = h;
+ osmo_timer_setup(&h->timer, osmux_tx_cb, h);
#ifdef DEBUG_TIMING
osmo_gettimeofday(&h->start, NULL);