0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-29 00:03:45 +02:00

ircd:Ⓜ️🆔 Report 0 if no port affixed to ID, 8448 not implied bc/ SRV.

This commit is contained in:
Jason Volk 2018-04-04 13:03:13 -07:00
parent b07213043f
commit b675567314
2 changed files with 3 additions and 3 deletions

View file

@ -66,7 +66,7 @@ struct ircd::m::id
string_view host() const; // The full server part including port
string_view localname() const; // The localpart not including sigil
string_view hostname() const; // The server part not including port
uint16_t port() const; // Just the port number or 8448 if none
uint16_t port() const; // Just the port number or 0 if none
IRCD_USING_OVERLOAD(generate, m::generate);

View file

@ -519,14 +519,14 @@ const
omit[parser.prefix >> ':' >> parser.dns_name >> ':'] >> parser.port
};
uint16_t ret{8448};
uint16_t ret{0};
auto *start{begin()};
const auto res
{
qi::parse(start, end(), rule, ret)
};
assert(res || ret == 8448);
assert(res || ret == 0);
return ret;
}