summaryrefslogtreecommitdiff
path: root/src/tests/cmocka
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-05-19 17:36:54 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-05-27 19:34:51 +0200
commit3bd78eb2faf09635b8d307e4440ccb1420f80716 (patch)
treec6a5c38c6ad0edf82b81949772e7a14723cf89df /src/tests/cmocka
parentbfdb2eeed95bde6cd065a9a47a7cb1773990ccfb (diff)
downloadsssd-3bd78eb2faf09635b8d307e4440ccb1420f80716.tar.gz
sssd-3bd78eb2faf09635b8d307e4440ccb1420f80716.tar.bz2
sssd-3bd78eb2faf09635b8d307e4440ccb1420f80716.zip
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.
Diffstat (limited to 'src/tests/cmocka')
-rw-r--r--src/tests/cmocka/test_dyndns.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tests/cmocka/test_dyndns.c b/src/tests/cmocka/test_dyndns.c
index 6d5219d7..f804d792 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,