trafficserver-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SolidWallOfCode <...@git.apache.org>
Subject [GitHub] trafficserver pull request: Maintain and use a mapping of hostname...
Date Thu, 02 Jul 2015 19:26:09 GMT
Github user SolidWallOfCode commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/240#discussion_r33813578
  
    --- Diff: iocore/hostdb/HostDB.cc ---
    @@ -2833,15 +2650,8 @@ ParseHostFile(char const *path)
         }
       }
     
    -  if (!HostFilePairs.empty()) {
    -    // Need to sort by name so multiple address hosts are
    -    // contiguous.
    -    std::sort(HostFilePairs.begin(), HostFilePairs.end(), &CmpHostFilePair);
    -    HostDBFileContinuation::scheduleUpdate(0);
    -  } else if (!HostFileKeys.empty()) {
    -    HostDBFileContinuation::scheduleRemove(-1, 0);
    -  } else {
    -    // Nothing in new data, nothing in old data, just clean up.
    -    HostDBFileContinuation::finish(0);
    -  }
    +  // Swap out hostDB's map for ours
    +  hostDB.hosts_file_ptr = parsed_hosts_file_ptr;
    +  // Make a new map, so we can do it all again
    +  parsed_hosts_file_ptr = new RefCountedHostsFileMap();
    --- End diff --
    
    Shouldn't this be done before you put it in `HostDB.hosts_file_ptr`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message