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:41:04 GMT
Github user SolidWallOfCode commented on a diff in the pull request:
    --- Diff: iocore/hostdb/P_HostDBProcessor.h ---
    @@ -190,6 +190,14 @@ extern RecRawStatBlock *hostdb_rsb;
     #define HOSTDB_DECREMENT_THREAD_DYN_STAT(_s, _t) RecIncrRawStatSum(hostdb_rsb, _t, (int)_s,
    +struct CmpConstBuffferCaseInsensitive {
    +  bool operator()(ts::ConstBuffer a, ts::ConstBuffer b) { return ptr_len_casecmp(a._ptr,
a._size, b._ptr, b._size) < 0;}
    +// A to hold a ref-counted map
    +struct RefCountedHostsFileMap : public RefCountObj {
    +  std::map<ts::ConstBuffer, IpAddr, CmpConstBuffferCaseInsensitive> hosts_file_map;
    --- End diff --
    You'll probably want `typedef std::map<ts::ConstBuffer, IpAddr, CmpConstBufferCaseInsensitive>
MapType;' here. It's a handy typedef.

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