Initial work to make irssi respect the resolved ip order

Ip's aren't selected using random() anymore, also select the ip version
by using getaddrinfo and some proper hints.
This commit is contained in:
LemonBoy 2015-09-21 13:54:13 +02:00
commit ffaa890e99
17 changed files with 87 additions and 236 deletions

View file

@ -138,7 +138,7 @@ static void cmd_server_add(const char *data)
if (*password != '\0') g_free_and_null(rec->password);
if (g_hash_table_lookup(optlist, "host")) {
g_free_and_null(rec->own_host);
rec->own_ip4 = rec->own_ip6 = NULL;
rec->own_ip = NULL;
}
}
@ -193,7 +193,7 @@ static void cmd_server_add(const char *data)
value = g_hash_table_lookup(optlist, "host");
if (value != NULL && *value != '\0') {
rec->own_host = g_strdup(value);
rec->own_ip4 = rec->own_ip6 = NULL;
rec->own_ip = NULL;
}
signal_emit("server add fill", 2, rec, optlist);