IPv6 fixes. Everything now keeps both v4 and v6 addresses in memory and

at connect() time it's decided which one should be used.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1334 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-03-04 01:47:13 +00:00 committed by cras
commit 4c7b07ed3f
21 changed files with 216 additions and 127 deletions

View file

@ -89,13 +89,10 @@ static SERVER_CONNECT_REC *get_server_connect(const char *data, int *plus_addr)
host = g_hash_table_lookup(optlist, "host");
if (host != NULL && *host != '\0') {
IPADDR ip;
IPADDR ip4, ip6;
if (net_gethostbyname(host, &ip, conn->family) == 0) {
if (conn->own_ip == NULL)
conn->own_ip = g_new(IPADDR, 1);
memcpy(conn->own_ip, &ip, sizeof(IPADDR));
}
if (net_gethostbyname(host, &ip4, &ip6) == 0)
server_connect_own_ip_save(conn, &ip4, &ip6);
}
cmd_params_free(free_arg);