Review at  https://gerrit.osmocom.org/2855

src: use osmo_timer_setup()

Use new function available in libosmocore to set up timers. Compile
tested only.

Change-Id: I4ca4950e49a09c63b608b13ac7561ebbd351889a
---
M src/input/dahdi.c
M src/input/ipaccess.c
M src/input/misdn.c
M src/input/unixsocket.c
4 files changed, 4 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/55/2855/1

diff --git a/src/input/dahdi.c b/src/input/dahdi.c
index 0945daa..911f862 100644
--- a/src/input/dahdi.c
+++ b/src/input/dahdi.c
@@ -252,8 +252,7 @@
                        sign_link->sapi, msg);
 
        /* set tx delay timer for next event */
-       e1i_ts->sign.tx_timer.cb = timeout_ts1_write;
-       e1i_ts->sign.tx_timer.data = e1i_ts;
+       osmo_timer_setup(&e1i_ts->sign.tx_timer, timeout_ts1_write, e1i_ts);
        osmo_timer_schedule(&e1i_ts->sign.tx_timer, 0, 50000);
 
        return 0;
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index ac84ffc..63ee167 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -354,8 +354,7 @@
        }
 
        /* set tx delay timer for next event */
-       e1i_ts->sign.tx_timer.cb = timeout_ts1_write;
-       e1i_ts->sign.tx_timer.data = e1i_ts;
+       osmo_timer_setup(&e1i_ts->sign.tx_timer, timeout_ts1_write, e1i_ts);
 
        /* Reducing this might break the nanoBTS 900 init. */
        osmo_timer_schedule(&e1i_ts->sign.tx_timer, 0, e1i_ts->sign.delay);
diff --git a/src/input/misdn.c b/src/input/misdn.c
index 98a836f..347b7bf 100644
--- a/src/input/misdn.c
+++ b/src/input/misdn.c
@@ -283,8 +283,7 @@
 
 
        /* set tx delay timer for next event */
-       e1i_ts->sign.tx_timer.cb = timeout_ts1_write;
-       e1i_ts->sign.tx_timer.data = e1i_ts;
+       osmo_timer_setup(&e1i_ts->sign.tx_timer, timeout_ts1_write, e1i_ts);
        osmo_timer_schedule(&e1i_ts->sign.tx_timer, 0, e1i_ts->sign.delay);
 
        return ret;
diff --git a/src/input/unixsocket.c b/src/input/unixsocket.c
index 4f287ae..63bd796 100644
--- a/src/input/unixsocket.c
+++ b/src/input/unixsocket.c
@@ -160,8 +160,7 @@
        }
 
        /* set tx delay timer for next event */
-       e1i_ts->sign.tx_timer.cb = timeout_ts1_write;
-       e1i_ts->sign.tx_timer.data = e1i_ts;
+       osmo_timer_setup(&e1i_ts->sign.tx_timer, timeout_ts1_write, e1i_ts);
 
        osmo_timer_schedule(&e1i_ts->sign.tx_timer, 0, e1i_ts->sign.delay);
 

-- 
To view, visit https://gerrit.osmocom.org/2855
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ca4950e49a09c63b608b13ac7561ebbd351889a
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Owner: Pablo Neira Ayuso <pa...@gnumonks.org>

Reply via email to