0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-24 17:38:54 +02:00

ircd::net: Fix port inclusion in these places.

This commit is contained in:
Jason Volk 2017-12-03 13:55:22 -08:00
parent 94b5bc75d3
commit c1bda4008f

View file

@ -752,6 +752,7 @@ noexcept try
} }
else host4(ret) = a.to_v4().to_ulong(); else host4(ret) = a.to_v4().to_ulong();
port(ret) = port(ep);
return ret; return ret;
} }
catch(...) catch(...)
@ -1600,7 +1601,7 @@ ircd::net::string(const uint32_t &ip,
{ {
const auto len const auto len
{ {
fmt::sprintf(buf, "%s:%u", ip::address_v4{ip}.to_string()) fmt::sprintf(buf, "%s", ip::address_v4{ip}.to_string())
}; };
return { data(buf), size_t(len) }; return { data(buf), size_t(len) };
@ -1622,7 +1623,7 @@ ircd::net::string(const uint128_t &ip,
const auto len const auto len
{ {
fmt::sprintf(buf, "%s:%u", ip::address_v6{punpun}.to_string()) fmt::sprintf(buf, "%s", ip::address_v6{punpun}.to_string())
}; };
return { data(buf), size_t(len) }; return { data(buf), size_t(len) };