}
}
- for(int i = 0; i < 4; i++) {
+ for(int i = 0; i < n; i++) {
// Ensure we always have a port number
if(hostname[i] && !port[i]) {
port[i] = xstrdup(mesh->myport);
remove_duplicate_hostnames(hostname, port, 4);
// Resolve the hostnames
- for(int i = 0; i < 4; i++) {
+ for(int i = 0; i < n; i++) {
if(!hostname[i]) {
continue;
}
}
// Remove duplicates again, since IPv4 and IPv6 addresses might map to the same hostname
- remove_duplicate_hostnames(hostname, port, 4);
+ remove_duplicate_hostnames(hostname, port, n);
// Concatenate all unique address to the hostport string
- for(int i = 0; i < 4; i++) {
+ for(int i = 0; i < n; i++) {
if(!hostname[i]) {
continue;
}