diff options
author | Simo Sorce <simo@redhat.com> | 2013-01-14 17:04:00 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-02-10 22:08:47 +0100 |
commit | 0232747f04b650796db56fd7b487aee8a96fab03 (patch) | |
tree | 0c0329a59cbb66b1e4ea4983cd034dc9015245dc /src/monitor | |
parent | 95e94691178297f2b8225a83d43ae388cab04b45 (diff) | |
download | sssd-0232747f04b650796db56fd7b487aee8a96fab03.tar.gz sssd-0232747f04b650796db56fd7b487aee8a96fab03.tar.bz2 sssd-0232747f04b650796db56fd7b487aee8a96fab03.zip |
Add function get_next_domain()
Use this function instead of explicitly calling domain->next
This function allows to get the next primary domain or to descend into the
subdomains and replaces also get_next_dom_or_subdom()
Diffstat (limited to 'src/monitor')
-rw-r--r-- | src/monitor/monitor.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index 2b699ca7..2c8cdb60 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -772,7 +772,7 @@ static int check_domain_ranges(struct sss_domain_info *domains) uint32_t id_min, id_max; while (dom) { - other = dom->next; + other = get_next_domain(dom, false); if (dom->id_max && dom->id_min > dom->id_max) { DEBUG(SSSDBG_CRIT_FAILURE, ("Domain '%s' does not have a valid ID range\n", dom->name)); @@ -788,9 +788,9 @@ static int check_domain_ranges(struct sss_domain_info *domains) ("Domains '%s' and '%s' overlap in range %u - %u\n", dom->name, other->name, id_min, id_max)); } - other = other->next; + other = get_next_domain(other, false); } - dom = dom->next; + dom = get_next_domain(dom, false); } return EOK; @@ -811,7 +811,7 @@ static int check_local_domain_unique(struct sss_domain_info *domains) break; } - dom = dom->next; + dom = get_next_domain(dom, false); } if (count > 1) { @@ -2235,7 +2235,7 @@ int monitor_process_init(struct mt_ctx *ctx, /* start providers */ num_providers = 0; - for (dom = ctx->domains; dom; dom = dom->next) { + for (dom = ctx->domains; dom; dom = get_next_domain(dom, false)) { ret = add_new_provider(ctx, dom->name, 0); if (ret != EOK && ret != ENOENT) { return ret; |