summaryrefslogtreecommitdiff
path: root/src/responder/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/responder/common')
-rw-r--r--src/responder/common/responder_common.c6
-rw-r--r--src/responder/common/responder_get_domains.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c
index 877181f8..c7aead3e 100644
--- a/src/responder/common/responder_common.c
+++ b/src/responder/common/responder_common.c
@@ -894,15 +894,15 @@ responder_get_domain(TALLOC_CTX *sd_mem_ctx, struct resp_ctx *rctx,
struct sss_domain_info *ret_dom = NULL;
for (dom = rctx->domains; dom; dom = get_next_domain(dom, true)) {
- if (!dom->parent) {
+ if (!IS_SUBDOMAIN(dom)) {
time_diff = now - dom->subdomains_last_checked.tv_sec;
}
if (strcasecmp(dom->name, name) == 0 ||
(dom->flat_name != NULL &&
strcasecmp(dom->flat_name, name) == 0)) {
ret_dom = dom;
- if (!dom->parent ||
- (dom->parent && time_diff < rctx->domains_timeout)) {
+ if (!IS_SUBDOMAIN(dom) ||
+ (IS_SUBDOMAIN(dom) && time_diff < rctx->domains_timeout)) {
break;
}
}
diff --git a/src/responder/common/responder_get_domains.c b/src/responder/common/responder_get_domains.c
index b69875e1..defa4a43 100644
--- a/src/responder/common/responder_get_domains.c
+++ b/src/responder/common/responder_get_domains.c
@@ -353,7 +353,7 @@ static errno_t check_last_request(struct resp_ctx *rctx, const char *hint)
if (hint != NULL) {
for (dom = rctx->domains; dom; dom = get_next_domain(dom, true)) {
- if (dom->parent == NULL) {
+ if (!IS_SUBDOMAIN(dom)) {
diff = now - dom->subdomains_last_checked.tv_sec;
/* not a subdomain */
continue;