summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2011-11-02 14:10:09 +0100
committerunknown <knielsen@knielsen-hq.org>2011-11-02 14:10:09 +0100
commitc915fdf15d09cbabe776a8ccb1ea1a1a8bb5afcf (patch)
treef0af2b965af7ac7ebe0a46b70f37e0ae937e79c6 /sql
parent5da52cd108468580f036b479be77ef80c64d1181 (diff)
downloadmariadb-git-c915fdf15d09cbabe776a8ccb1ea1a1a8bb5afcf.tar.gz
Revert wrong change.
Diffstat (limited to 'sql')
-rw-r--r--sql/mysqld.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 5846bc2238a..10107dfab15 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -2117,8 +2117,12 @@ static my_socket activate_tcp_port(uint port)
unireg_abort(1); /* purecov: tested */
}
- for (a= ai; a != NULL && ip_sock == INVALID_SOCKET; a= a->ai_next)
- ip_sock= socket(a->ai_family, a->ai_socktype, a->ai_protocol);
+ for (a= ai; a != NULL; a= a->ai_next)
+ {
+ ip_sock= socket(a->ai_family, a->ai_socktype, a->ai_protocol);
+ if (ip_sock != INVALID_SOCKET)
+ break;
+ }
if (ip_sock == INVALID_SOCKET)
{