mirror of
https://github.com/irssi/irssi.git
synced 2026-08-16 23:22:16 +02:00
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:
parent
5afb3c1454
commit
4c7b07ed3f
21 changed files with 216 additions and 127 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue