1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

When IPv4 or v6 wasn't forced, irssi picked improperly IPv4 even if there

was only v6 address.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2591 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-03-13 01:21:11 +00:00 committed by cras
parent 7b1d5ed41a
commit 2a57e797ce

View File

@ -198,8 +198,9 @@ static void server_connect_callback_readpipe(SERVER_REC *server)
} else { } else {
/* pick the one that was found, or if both do it like /* pick the one that was found, or if both do it like
/SET resolve_prefer_ipv6 says. */ /SET resolve_prefer_ipv6 says. */
ip = iprec.ip6.family != 0 && ip = iprec.ip4.family == 0 ||
settings_get_bool("resolve_prefer_ipv6") ? (iprec.ip6.family != 0 &&
settings_get_bool("resolve_prefer_ipv6")) ?
&iprec.ip6 : &iprec.ip4; &iprec.ip6 : &iprec.ip4;
} }