0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-27 11:18:51 +02:00

ircd::net::dns: Tweak reference prototypes.

This commit is contained in:
Jason Volk 2018-05-08 14:29:44 -07:00
parent 070f359707
commit 618fc8a95e
3 changed files with 4 additions and 4 deletions

View file

@ -35,7 +35,7 @@ struct ircd::net::dns
struct resolver static *resolver;
struct opts static const opts_default;
using callback = std::function<void (std::exception_ptr, const hostport &, vector_view<const rfc1035::record *>)>;
using callback = std::function<void (std::exception_ptr, const hostport &, const vector_view<const rfc1035::record *> &)>;
using callback_A_one = std::function<void (std::exception_ptr, const hostport &, const rfc1035::record::A &)>;
using callback_SRV_one = std::function<void (std::exception_ptr, const hostport &, const rfc1035::record::SRV &)>;
using callback_ipport_one = std::function<void (std::exception_ptr, const hostport &, const ipport &)>;

View file

@ -54,7 +54,7 @@ struct ircd::net::dns::resolver
template<class... A> tag &set_tag(A&&...);
const_buffer make_query(const mutable_buffer &buf, const tag &) const;
void operator()(const hostport &, const opts &, callback);
void operator()(const hostport &, const opts &, callback &&);
bool check_timeout(const uint16_t &id, tag &, const steady_point &expired);
void check_timeouts(const milliseconds &timeout);

View file

@ -2476,7 +2476,7 @@ ircd::net::dns::operator()(const hostport &hp,
{
assert(bool(ircd::net::dns::resolver));
operator()(hp, opts, [callback(std::move(callback))]
(std::exception_ptr eptr, const hostport &hp, const vector_view<const rfc1035::record *> rrs)
(std::exception_ptr eptr, const hostport &hp, const vector_view<const rfc1035::record *> &rrs)
{
static const rfc1035::record::A empty;
@ -2963,7 +2963,7 @@ ircd::net::dns::resolver::check_timeout(const uint16_t &id,
void
ircd::net::dns::resolver::operator()(const hostport &hp,
const opts &opts,
callback callback)
callback &&callback)
{
auto &tag
{