mirror of
https://github.com/matrix-construct/construct
synced 2024-11-26 00:32:35 +01:00
ircd::net: Underp the cache map until heterogeneous key support in stdlib.
This commit is contained in:
parent
7021250cc3
commit
2ec4bd025f
2 changed files with 3 additions and 6 deletions
|
@ -85,11 +85,8 @@ struct ircd::net::dns::opts
|
|||
/// (internal) DNS cache
|
||||
struct ircd::net::dns::cache
|
||||
{
|
||||
using hash = std::hash<string_view>;
|
||||
using equal_to = std::equal_to<string_view>;
|
||||
|
||||
std::unordered_multimap<std::string, rfc1035::record::A, hash, equal_to> A;
|
||||
std::unordered_multimap<std::string, rfc1035::record::SRV, hash, equal_to> SRV;
|
||||
std::multimap<std::string, rfc1035::record::A, std::less<>> A;
|
||||
std::multimap<std::string, rfc1035::record::SRV, std::less<>> SRV;
|
||||
};
|
||||
|
||||
template<class Callback>
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue