From 3bd78eb2faf09635b8d307e4440ccb1420f80716 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Sun, 19 May 2013 17:36:54 +0200 Subject: Fix dyndns timer initialization The dyndns init function was starting the timer even if the updates were set to False. This patch splits the init of dynamic updates and the timer into two functions so that the back end can start the updates separately from reading the options. --- src/tests/cmocka/test_dyndns.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/tests') diff --git a/src/tests/cmocka/test_dyndns.c b/src/tests/cmocka/test_dyndns.c index 6d5219d71..f804d7926 100644 --- a/src/tests/cmocka/test_dyndns.c +++ b/src/tests/cmocka/test_dyndns.c @@ -311,10 +311,14 @@ void dyndns_test_interval(void **state) check_leaks_push(tmp_ctx); ret = be_nsupdate_init(tmp_ctx, dyndns_test_ctx->be_ctx, NULL, - dyndns_test_timer, dyndns_test_ctx, &dyndns_test_ctx->update_ctx); assert_int_equal(ret, EOK); + ret = be_nsupdate_init_timer(dyndns_test_ctx->update_ctx, + dyndns_test_ctx->be_ctx->ev, + dyndns_test_timer, dyndns_test_ctx); + assert_int_equal(ret, EOK); + /* Wait until the timer hits */ ret = test_ev_loop(dyndns_test_ctx->tctx); DEBUG(SSSDBG_TRACE_LIBS, -- cgit