mirror of
https://github.com/irssi/irssi.git
synced 2026-08-23 10:32:31 +02:00
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:
parent
f247a43b97
commit
c2a3ae0706
17 changed files with 87 additions and 236 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue