From ffaa890e99e2176ff3d2dec0ab5a8136e1e946ff Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Mon, 21 Sep 2015 13:54:13 +0200 Subject: 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. --- src/fe-common/irc/fe-ircnet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/fe-common/irc') diff --git a/src/fe-common/irc/fe-ircnet.c b/src/fe-common/irc/fe-ircnet.c index 6618edd7..4071f367 100644 --- a/src/fe-common/irc/fe-ircnet.c +++ b/src/fe-common/irc/fe-ircnet.c @@ -108,7 +108,7 @@ static void cmd_network_add(const char *data) if (g_hash_table_lookup(optlist, "realname")) g_free_and_null(rec->realname); 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; } if (g_hash_table_lookup(optlist, "usermode")) g_free_and_null(rec->usermode); if (g_hash_table_lookup(optlist, "autosendcmd")) g_free_and_null(rec->autosendcmd); @@ -140,7 +140,7 @@ static void cmd_network_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; } value = g_hash_table_lookup(optlist, "usermode"); -- cgit v1.2.3