From 5121576b0c6c323ae5f92d8d987b8c0899d99db0 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 8 May 2017 20:57:52 +0200 Subject: src: use osmo_timer_setup() Use new function available in libosmocore to set up timers. Compile tested only. Change-Id: Ibcfd915688e97d370a888888a83a7c95cbe16819 --- openbsc/src/libmsc/gsm_04_08.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'openbsc/src/libmsc/gsm_04_08.c') diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 376106f5f..89108e466 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -618,8 +618,8 @@ static void loc_upd_rej_cb(void *data) static void schedule_reject(struct gsm_subscriber_connection *conn) { - conn->loc_operation->updating_timer.cb = loc_upd_rej_cb; - conn->loc_operation->updating_timer.data = conn; + osmo_timer_setup(&conn->loc_operation->updating_timer, loc_upd_rej_cb, + conn); osmo_timer_schedule(&conn->loc_operation->updating_timer, 5, 0); } @@ -2224,8 +2224,7 @@ static void gsm48_start_cc_timer(struct gsm_trans *trans, int current, int sec, int micro) { DEBUGP(DCC, "starting timer T%x with %d seconds\n", current, sec); - trans->cc.timer.cb = gsm48_cc_timeout; - trans->cc.timer.data = trans; + osmo_timer_setup(&trans->cc.timer, gsm48_cc_timeout, trans); osmo_timer_schedule(&trans->cc.timer, sec, micro); trans->cc.Tcurrent = current; } @@ -3955,8 +3954,7 @@ int gsm0408_new_conn(struct gsm_subscriber_connection *conn) if (!conn->anch_operation) return -1; - conn->anch_operation->timeout.data = conn; - conn->anch_operation->timeout.cb = anchor_timeout; + osmo_timer_setup(&conn->anch_operation->timeout, anchor_timeout, conn); osmo_timer_schedule(&conn->anch_operation->timeout, 5, 0); return 0; } -- cgit v1.2.3