if(mesh->invitation_addresses) {
for list_each(char, combo, mesh->invitation_addresses) {
hostname[n] = xstrdup(combo);
- char *colon = strchr(hostname[n], ':');
+ char *colon = strrchr(hostname[n], ':');
if(colon) {
*colon = 0;
char *combo;
if(port) {
- if(strchr(address, ':')) {
- xasprintf(&combo, "[%s]:%s", address, port);
- } else {
- xasprintf(&combo, "%s:%s", address, port);
- }
+ xasprintf(&combo, "%s:%s", address, port);
} else {
combo = xstrdup(address);
}