trafficserver-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SolidWallOfCode <>
Subject [GitHub] trafficserver pull request: Maintain and use a mapping of hostname...
Date Thu, 02 Jul 2015 20:42:07 GMT
Github user SolidWallOfCode commented on a diff in the pull request:
    --- Diff: iocore/hostdb/ ---
    @@ -659,6 +660,21 @@ db_mark_for(IpAddr const &ip)
     HostDBInfo *
     probe(ProxyMutex *mutex, HostDBMD5 const &md5, bool ignore_timeout)
    +  // If we have an entry in our hosts file, we don't need to bother with DNS
    +  Ptr<RefCountedHostsFileMap> current_host_file_map = hostDB.hosts_file_ptr;
    +  ts::ConstBuffer hname(md5.host_name, md5.host_len);
    +  std::_Rb_tree_iterator<std::pair<const ts::ConstBuffer, IpAddr> > find_result
= current_host_file_map->hosts_file_map.find(hname);
    --- End diff --
    It's not a good idea to dig around in the internals of `std::map`. The official way to
do this is `std::map<ts::ConstBuffer, IpAddr, CmpConstBufferCaseInsensitive>::iterator`.

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 or file a JIRA ticket
with INFRA.

View raw message