aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/bsc_msc.c
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/libbsc/bsc_msc.c
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/libbsc/bsc_msc.c')
-rw-r--r--openbsc/src/libbsc/bsc_msc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/openbsc/src/libbsc/bsc_msc.c b/openbsc/src/libbsc/bsc_msc.c
index e373679c1..82a572dbe 100644
--- a/openbsc/src/libbsc/bsc_msc.c
+++ b/openbsc/src/libbsc/bsc_msc.c
@@ -211,8 +211,7 @@ int bsc_msc_connect(struct bsc_msc_connection *con)
"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 @@ void bsc_msc_schedule_connect(struct bsc_msc_connection *con)
{
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);
}