diff -r 56cd8111b7f7 -r 41300fa6a67c examples/network/fortuneserver/server.cpp --- a/examples/network/fortuneserver/server.cpp Tue Jan 26 12:42:25 2010 +0200 +++ b/examples/network/fortuneserver/server.cpp Tue Feb 02 00:43:10 2010 +0200 @@ -68,8 +68,10 @@ // use the first non-localhost IPv4 address for (int i = 0; i < ipAddressesList.size(); ++i) { if (ipAddressesList.at(i) != QHostAddress::LocalHost && - ipAddressesList.at(i).toIPv4Address()) + ipAddressesList.at(i).toIPv4Address()) { ipAddress = ipAddressesList.at(i).toString(); + break; + } } // if we did not find one, use IPv4 localhost if (ipAddress.isEmpty())