src: use osmo_timer_setup()
Use new function available in libosmocore to set up timers. Compile
tested only.
Change-Id: Ibcfd915688e97d370a888888a83a7c95cbe16819
diff --git a/openbsc/src/libbsc/bsc_msc.c b/openbsc/src/libbsc/bsc_msc.c
index e373679..82a572d 100644
--- a/openbsc/src/libbsc/bsc_msc.c
+++ b/openbsc/src/libbsc/bsc_msc.c
@@ -211,8 +211,7 @@
"MSC(%s) Connection in progress\n", con->name);
fd->when = BSC_FD_WRITE;
fd->cb = msc_connection_connect;
- con->timeout_timer.cb = msc_con_timeout;
- con->timeout_timer.data = con;
+ osmo_timer_setup(&con->timeout_timer, msc_con_timeout, con);
osmo_timer_schedule(&con->timeout_timer, 20, 0);
} else if (ret < 0) {
perror("Connection failed");
@@ -277,8 +276,7 @@
{
LOGP(DMSC, LOGL_NOTICE,
"Attempting to reconnect to the MSC(%s)\n", con->name);
- con->reconnect_timer.cb = reconnect_msc;
- con->reconnect_timer.data = con;
+ osmo_timer_setup(&con->reconnect_timer, reconnect_msc, con);
osmo_timer_schedule(&con->reconnect_timer, 5, 0);
}