Put brackets around IPv6 addresses in invitation URL, even if there is no port number.

This commit is contained in:
Guus Sliepen 2014-04-25 17:00:55 +02:00
parent 475088ed77
commit 18698c4e12

View file

@ -197,8 +197,10 @@ done:
else
xasprintf(&hostport, "%s:%s", hostname, port);
} else {
hostport = hostname;
hostname = NULL;
if(strchr(hostname, ':'))
xasprintf(&hostport, "[%s]", hostname);
else
hostport = xstrdup(hostname);
}
free(hostname);