From 618fc8a95ebfed9f0c667761719056799fe3a3b9 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Tue, 8 May 2018 14:29:44 -0700 Subject: [PATCH] ircd::net::dns: Tweak reference prototypes. --- include/ircd/net/dns.h | 2 +- include/ircd/net/resolver.h | 2 +- ircd/net.cc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/ircd/net/dns.h b/include/ircd/net/dns.h index 5cea611e1..c1de88359 100644 --- a/include/ircd/net/dns.h +++ b/include/ircd/net/dns.h @@ -35,7 +35,7 @@ struct ircd::net::dns struct resolver static *resolver; struct opts static const opts_default; - using callback = std::function)>; + 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/resolver.h b/include/ircd/net/resolver.h index f059655cb..4debe0d8c 100644 --- a/include/ircd/net/resolver.h +++ b/include/ircd/net/resolver.h @@ -54,7 +54,7 @@ struct ircd::net::dns::resolver template 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); diff --git a/ircd/net.cc b/ircd/net.cc index 685c1e920..2fd1f62a7 100644 --- a/ircd/net.cc +++ b/ircd/net.cc @@ -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 rrs) + (std::exception_ptr eptr, const hostport &hp, const vector_view &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 {