summaryrefslogtreecommitdiff
path: root/src/providers/ad/ad_dyndns.c
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/providers/ad/ad_dyndns.c
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/providers/ad/ad_dyndns.c')
-rw-r--r--src/providers/ad/ad_dyndns.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/providers/ad/ad_dyndns.c b/src/providers/ad/ad_dyndns.c
index 2b2d2462..4e9ed852 100644
--- a/src/providers/ad/ad_dyndns.c
+++ b/src/providers/ad/ad_dyndns.c
@@ -70,6 +70,13 @@ errno_t ad_dyndns_init(struct be_ctx *be_ctx,
return EINVAL;
}
+ ret = be_nsupdate_init_timer(ad_opts->dyndns_ctx, be_ctx->ev,
+ ad_dyndns_timer, ad_opts);
+ if (ret != EOK) {
+ DEBUG(SSSDBG_CRIT_FAILURE, ("Could not set up periodic update\n"));
+ return ret;
+ }
+
ret = be_add_online_cb(be_ctx, be_ctx,
ad_dyndns_update,
ad_opts, NULL);