From 66ab3d85a57ca3dd9dc1dd446d3dceed224b4e1b Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 3 Oct 2018 14:17:27 -0700 Subject: [PATCH] ircd::net: Use ip to test ipport falsiness; typedef a resource record vector. --- include/ircd/net/dns.h | 3 ++- include/ircd/net/ipport.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/ircd/net/dns.h b/include/ircd/net/dns.h index 2d611eeaf..a1b6df240 100644 --- a/include/ircd/net/dns.h +++ b/include/ircd/net/dns.h @@ -21,7 +21,8 @@ namespace ircd::net::dns { struct opts extern const opts_default; - using callback = std::function &)>; + using records = vector_view; + using callback = std::function; using callback_A_one = std::function; using callback_SRV_one = std::function; using callback_ipport_one = std::function; diff --git a/include/ircd/net/ipport.h b/include/ircd/net/ipport.h index c6a290d31..ffe1c22d1 100644 --- a/include/ircd/net/ipport.h +++ b/include/ircd/net/ipport.h @@ -106,7 +106,7 @@ inline ircd::net::ipport::operator bool() const { - return std::get(*this) != 0; + return host6(*this) != uint128_t(0); } inline ircd::uint128_t &