mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 16:04:15 +01:00
ircd::net::dns::resolver: Copy to preserve service string from hostport in tag.
This commit is contained in:
parent
fddeb548a7
commit
65d41d0093
1 changed files with 19 additions and 8 deletions
|
@ -108,18 +108,29 @@ struct ircd::net::dns::tag
|
|||
uint rcode {0};
|
||||
ipport server;
|
||||
char hostbuf[rfc1035::NAME_BUFSIZE];
|
||||
char servicebuf[256];
|
||||
char qbuf[512];
|
||||
|
||||
tag(const hostport &hp, const dns::opts &opts)
|
||||
:hp{hp}
|
||||
,opts{opts}
|
||||
{
|
||||
this->hp.host = { hostbuf, copy(hostbuf, hp.host) };
|
||||
this->hp.service = {};
|
||||
}
|
||||
|
||||
tag(const hostport &hp, const dns::opts &opts);
|
||||
tag(tag &&) = delete;
|
||||
tag(const tag &) = delete;
|
||||
tag &operator=(tag &&) = delete;
|
||||
tag &operator=(const tag &) = delete;
|
||||
};
|
||||
|
||||
inline
|
||||
ircd::net::dns::tag::tag(const hostport &hp,
|
||||
const dns::opts &opts)
|
||||
:hp{hp}
|
||||
,opts{opts}
|
||||
{
|
||||
this->hp.host =
|
||||
{
|
||||
hostbuf, copy(hostbuf, hp.host)
|
||||
};
|
||||
|
||||
this->hp.service =
|
||||
{
|
||||
servicebuf, copy(servicebuf, hp.service)
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue