diff options
author | Timo Sirainen <cras@irssi.org> | 2002-03-13 01:21:11 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-03-13 01:21:11 +0000 |
commit | 2a57e797ce00beacc28a7b8559516786929e3d1c (patch) | |
tree | 2f97dbd40b9ee39d7411983dea2ea6cb76abdf96 /src/core | |
parent | 7b1d5ed41aeb7d6dc99655281771f1436dfa5a22 (diff) | |
download | irssi-2a57e797ce00beacc28a7b8559516786929e3d1c.zip |
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
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/servers.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/servers.c b/src/core/servers.c index 2f3d15d1..a5a8c701 100644 --- a/src/core/servers.c +++ b/src/core/servers.c @@ -198,8 +198,9 @@ static void server_connect_callback_readpipe(SERVER_REC *server) } else { /* pick the one that was found, or if both do it like /SET resolve_prefer_ipv6 says. */ - ip = iprec.ip6.family != 0 && - settings_get_bool("resolve_prefer_ipv6") ? + ip = iprec.ip4.family == 0 || + (iprec.ip6.family != 0 && + settings_get_bool("resolve_prefer_ipv6")) ? &iprec.ip6 : &iprec.ip4; } |