Blame SOURCES/0108-CACHE_REQ_DOMAIN-Add-some-comments-to-cache_req_doma.patch

ecf709
From 3d55506f2e6584d412ca07f2d0d77375aae48ba9 Mon Sep 17 00:00:00 2001
ecf709
From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fidencio@redhat.com>
ecf709
Date: Mon, 24 Apr 2017 21:04:58 +0200
ecf709
Subject: [PATCH 108/110] CACHE_REQ_DOMAIN: Add some comments to
ecf709
 cache_req_domain_new_list_from_string_list()
ecf709
MIME-Version: 1.0
ecf709
Content-Type: text/plain; charset=UTF-8
ecf709
Content-Transfer-Encoding: 8bit
ecf709
ecf709
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
ecf709
ecf709
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
ecf709
(cherry picked from commit f9bac02756aa05cc9c6ac07ae581dba67240c1a4)
ecf709
---
ecf709
 src/responder/common/cache_req/cache_req_domain.c | 4 ++++
ecf709
 1 file changed, 4 insertions(+)
ecf709
ecf709
diff --git a/src/responder/common/cache_req/cache_req_domain.c b/src/responder/common/cache_req/cache_req_domain.c
ecf709
index bfdd2b7f640178f6d0a0d92f2fed329c856b478c..6d37db0f109d5343eb6d7f4272bea522d4c34cf7 100644
ecf709
--- a/src/responder/common/cache_req/cache_req_domain.c
ecf709
+++ b/src/responder/common/cache_req/cache_req_domain.c
ecf709
@@ -116,6 +116,8 @@ cache_req_domain_new_list_from_string_list(TALLOC_CTX *mem_ctx,
ecf709
     bool enforce_non_fqnames = false;
ecf709
     errno_t ret;
ecf709
 
ecf709
+    /* Firstly, in case a domains' resolution order is passed ... iterate over
ecf709
+     * the list adding its domains to the flatten cache req domains' list */
ecf709
     if (resolution_order != NULL) {
ecf709
         enforce_non_fqnames = true;
ecf709
         for (i = 0; resolution_order[i] != NULL; i++) {
ecf709
@@ -141,6 +143,8 @@ cache_req_domain_new_list_from_string_list(TALLOC_CTX *mem_ctx,
ecf709
         }
ecf709
     }
ecf709
 
ecf709
+    /* Then iterate through all the other domains (and subdomains) and add them
ecf709
+     * to the flatten cache req domains' list */
ecf709
     for (dom = domains; dom; dom = get_next_domain(dom, flag)) {
ecf709
         if (string_in_list(dom->name, resolution_order, false)) {
ecf709
             continue;
ecf709
-- 
ecf709
2.9.3
ecf709