diff --git a/include/ircd/net/remote.h b/include/ircd/net/remote.h index 61b69de29..35e96c563 100644 --- a/include/ircd/net/remote.h +++ b/include/ircd/net/remote.h @@ -54,8 +54,6 @@ namespace ircd::net std::string string(const hostport &); std::string string(const ipport &); std::string string(const remote &); - - extern const remote null_remote; } /// This structure holds a hostname and port usually fresh from user input @@ -119,6 +117,8 @@ struct ircd::net::ipport struct ircd::net::remote :ircd::net::ipport { + static const remote null; + std::string hostname; operator bool() const; diff --git a/ircd/net.cc b/ircd/net.cc index 8ba878d43..0b7fbdbe3 100644 --- a/ircd/net.cc +++ b/ircd/net.cc @@ -1516,10 +1516,6 @@ ircd::net::string(const mutable_buffer &buf, // net/remote.h // -const ircd::net::remote -ircd::net::null_remote -{}; - // // host / port utils // @@ -1686,6 +1682,10 @@ ircd::net::string(const remote &remote, // remote // +const ircd::net::remote +ircd::net::remote::null +{}; + ircd::net::remote::remote(hostport hp) :remote{std::move(hp.first), hp.second} {