summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-03-13 01:21:11 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-03-13 01:21:11 +0000
commit2a57e797ce00beacc28a7b8559516786929e3d1c (patch)
tree2f97dbd40b9ee39d7411983dea2ea6cb76abdf96 /src/core
parent7b1d5ed41aeb7d6dc99655281771f1436dfa5a22 (diff)
downloadirssi-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.c5
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;
}