diff options
author | LemonBoy <thatlemon@gmail.com> | 2015-09-21 13:54:13 +0200 |
---|---|---|
committer | LemonBoy <thatlemon@gmail.com> | 2015-09-21 14:19:35 +0200 |
commit | ffaa890e99e2176ff3d2dec0ab5a8136e1e946ff (patch) | |
tree | 8c3765d9736a0f86037b42c18fd3c1553b4a2434 /src/core/servers-reconnect.c | |
parent | 0912a1105058829559529e2ae7d62daccb8337f6 (diff) | |
download | irssi-ffaa890e99e2176ff3d2dec0ab5a8136e1e946ff.zip |
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.
Diffstat (limited to 'src/core/servers-reconnect.c')
-rw-r--r-- | src/core/servers-reconnect.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/core/servers-reconnect.c b/src/core/servers-reconnect.c index ae97ecd2..3ba18ad0 100644 --- a/src/core/servers-reconnect.c +++ b/src/core/servers-reconnect.c @@ -177,13 +177,9 @@ server_connect_copy_skeleton(SERVER_CONNECT_REC *src, int connect_info) dest->username = g_strdup(src->username); dest->realname = g_strdup(src->realname); - if (src->own_ip4 != NULL) { - dest->own_ip4 = g_new(IPADDR, 1); - memcpy(dest->own_ip4, src->own_ip4, sizeof(IPADDR)); - } - if (src->own_ip6 != NULL) { - dest->own_ip6 = g_new(IPADDR, 1); - memcpy(dest->own_ip6, src->own_ip6, sizeof(IPADDR)); + if (src->own_ip != NULL) { + dest->own_ip = g_new(IPADDR, 1); + memcpy(dest->own_ip, src->own_ip, sizeof(IPADDR)); } dest->channels = g_strdup(src->channels); |