IPv6 endpoint was printed incorrectly on the Advanced tab
This commit is contained in:
parent
15f5c2e0d4
commit
ac9930e270
1 changed files with 5 additions and 1 deletions
|
@ -1521,7 +1521,11 @@ static const char *GetAdvancedInfoValue(char buffer[256], int i) {
|
||||||
if (ps->endpoint.sin.sin_family == 0)
|
if (ps->endpoint.sin.sin_family == 0)
|
||||||
return "";
|
return "";
|
||||||
PrintIpAddr(ps->endpoint, ip);
|
PrintIpAddr(ps->endpoint, ip);
|
||||||
snprintf(buffer, 256, "%s:%d", ip, htons(ps->endpoint.sin.sin_port));
|
if (ps->endpoint.sin.sin_family == AF_INET6) {
|
||||||
|
snprintf(buffer, 256, "[%s]:%d", ip, htons(ps->endpoint.sin.sin_port));
|
||||||
|
} else {
|
||||||
|
snprintf(buffer, 256, "%s:%d", ip, htons(ps->endpoint.sin.sin_port));
|
||||||
|
}
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue