summaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2017-05-08 20:57:52 +0200
committerPablo Neira Ayuso <pablo@gnumonks.org>2017-05-10 11:21:24 +0200
commit5121576b0c6c323ae5f92d8d987b8c0899d99db0 (patch)
treec0157908247ea2f068fa942575753be416e43402 /openbsc/src/osmo-bsc
parent7b62d54b52457ecae649ead12e67369b3e09c235 (diff)
src: use osmo_timer_setup()
Use new function available in libosmocore to set up timers. Compile tested only. Change-Id: Ibcfd915688e97d370a888888a83a7c95cbe16819
Diffstat (limited to 'openbsc/src/osmo-bsc')
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_msc.c6
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_sccp.c6
2 files changed, 4 insertions, 8 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_msc.c b/openbsc/src/osmo-bsc/osmo_bsc_msc.c
index 42e805515..8d02624b4 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_msc.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_msc.c
@@ -526,10 +526,8 @@ int osmo_bsc_msc_init(struct bsc_msc_data *data)
return -1;
}
- data->ping_timer.cb = msc_ping_timeout_cb;
- data->ping_timer.data = data;
- data->pong_timer.cb = msc_pong_timeout_cb;
- data->pong_timer.data = data;
+ osmo_timer_setup(&data->ping_timer, msc_ping_timeout_cb, data);
+ osmo_timer_setup(&data->pong_timer, msc_pong_timeout_cb, data);
data->msc_con->write_queue.bfd.data = data;
data->msc_con->connection_loss = msc_connection_was_lost;
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
index 970d70e82..e242390ef 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
@@ -232,10 +232,8 @@ enum bsc_con bsc_create_new_connection(struct gsm_subscriber_connection *conn,
bsc_con->send_ping = send_ping;
/* prepare the timers */
- bsc_con->sccp_it_timeout.cb = sccp_it_timeout;
- bsc_con->sccp_it_timeout.data = bsc_con;
- bsc_con->sccp_cc_timeout.cb = sccp_cc_timeout;
- bsc_con->sccp_cc_timeout.data = bsc_con;
+ osmo_timer_setup(&bsc_con->sccp_it_timeout, sccp_it_timeout, bsc_con);
+ osmo_timer_setup(&bsc_con->sccp_cc_timeout, sccp_cc_timeout, bsc_con);
INIT_LLIST_HEAD(&bsc_con->sccp_queue);