From 2ec4bd025f6d9906139342621a33b8e7a637d337 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Tue, 6 Mar 2018 04:03:31 -0800 Subject: [PATCH] ircd::net: Underp the cache map until heterogeneous key support in stdlib. --- include/ircd/net/dns.h | 7 ++----- ircd/net.cc | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/ircd/net/dns.h b/include/ircd/net/dns.h index fd265baa4..5ee49ce97 100644 --- a/include/ircd/net/dns.h +++ b/include/ircd/net/dns.h @@ -85,11 +85,8 @@ struct ircd::net::dns::opts /// (internal) DNS cache struct ircd::net::dns::cache { - using hash = std::hash; - using equal_to = std::equal_to; - - std::unordered_multimap A; - std::unordered_multimap SRV; + std::multimap> A; + std::multimap> SRV; }; template diff --git a/ircd/net.cc b/ircd/net.cc index ab55e4fbb..71a376ab9 100644 --- a/ircd/net.cc +++ b/ircd/net.cc @@ -2293,7 +2293,7 @@ ircd::net::dns::query_cache(const hostport &hp, }; auto &map{cache.SRV}; - const auto pit{map.equal_range(std::string{srvhost})}; //TODO: XXX + const auto pit{map.equal_range(srvhost)}; if(pit.first == pit.second) return false;