This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 43097fb  Mark host as partial when subdmains are more than default 
table depth
43097fb is described below

commit 43097fb638db6a92a5674c5d2182febb1e9137e3
Author: Vijay Mamidi <[email protected]>
AuthorDate: Thu Oct 10 23:04:06 2019 -0700

    Mark host as partial when subdmains are more than default table depth
    
    (cherry picked from commit 9ca5abc19a89ca518049921dd9cd827268cb22a0)
---
 src/tscore/HostLookup.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/tscore/HostLookup.cc b/src/tscore/HostLookup.cc
index 72759d9..22ee664 100644
--- a/src/tscore/HostLookup.cc
+++ b/src/tscore/HostLookup.cc
@@ -785,15 +785,15 @@ HostLookup::TableInsert(string_view match_data, int 
index, bool domain_record)
   //         leaf node to make sure we have a match
   if (domain_record == false) {
     if (match.empty()) {
-      leaf_array[index].type = HostLeaf::HOST_PARTIAL;
-    } else {
       leaf_array[index].type = HostLeaf::HOST_COMPLETE;
+    } else {
+      leaf_array[index].type = HostLeaf::HOST_PARTIAL;
     }
   } else {
     if (match.empty()) {
-      leaf_array[index].type = HostLeaf::DOMAIN_PARTIAL;
-    } else {
       leaf_array[index].type = HostLeaf::DOMAIN_COMPLETE;
+    } else {
+      leaf_array[index].type = HostLeaf::DOMAIN_PARTIAL;
     }
   }
 

Reply via email to