diff options
author | Timo Sirainen <cras@irssi.org> | 2001-03-04 01:47:13 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-03-04 01:47:13 +0000 |
commit | 4c7b07ed3fb03528d8f9b62297fd5d8df30929bf (patch) | |
tree | 5bc71bbfdcd907636b6ff27cbfed3e5fb2b03617 /src/irc/dcc/dcc-chat.c | |
parent | 5afb3c14541ec328483813e0783969ecc266042a (diff) | |
download | irssi-4c7b07ed3fb03528d8f9b62297fd5d8df30929bf.zip |
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
Diffstat (limited to 'src/irc/dcc/dcc-chat.c')
-rw-r--r-- | src/irc/dcc/dcc-chat.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/irc/dcc/dcc-chat.c b/src/irc/dcc/dcc-chat.c index c2b05595..2e45c2fc 100644 --- a/src/irc/dcc/dcc-chat.c +++ b/src/irc/dcc/dcc-chat.c @@ -362,6 +362,8 @@ static void sig_chat_connected(CHAT_DCC_REC *dcc) static void dcc_chat_connect(CHAT_DCC_REC *dcc) { + IPADDR *own_ip; + g_return_if_fail(IS_DCC_CHAT(dcc)); if (dcc->addrstr[0] == '\0' || @@ -370,8 +372,8 @@ static void dcc_chat_connect(CHAT_DCC_REC *dcc) return; } - dcc->handle = net_connect_ip(&dcc->addr, dcc->port, - source_host_ok ? source_host_ip : NULL); + own_ip = IPADDR_IS_V6(&dcc->addr) ? source_host_ip6 : source_host_ip4; + dcc->handle = net_connect_ip(&dcc->addr, dcc->port, own_ip); if (dcc->handle != NULL) { dcc->tagconn = g_input_add(dcc->handle, G_INPUT_WRITE | G_INPUT_READ, |