Fix QHostInfo IP resolution when there's no reverse for the IP.
commit52e22e7b9313233dd248753b25f56cd912382981
authorThiago Macieira <thiago.macieira@nokia.com>
Fri, 9 Oct 2009 07:49:59 +0000 (9 09:49 +0200)
committerThiago Macieira <thiago.macieira@nokia.com>
Fri, 9 Oct 2009 08:02:53 +0000 (9 10:02 +0200)
treec6fbce025152f021701307758ea3e0dd267b63fc
parenteb7daff1548510002031140ceb7fc601d064f670
Fix QHostInfo IP resolution when there's no reverse for the IP.

If you try to resolve 10.3.4.6, you're probably going to get that it
doesn't exist. On some systems, getnameinfo will return the IP address
in string form (Linux, without NI_NAMEREQD). On some others, it will
fail (Mac, Windows).

So harmonise by gracefully handling the case in which getnameinfo
fails.

Possible behaviour change: we don't try the forward resolution any
more, after completing the reverse one.

Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
src/network/kernel/qhostinfo_unix.cpp
src/network/kernel/qhostinfo_win.cpp