X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/984992ef01577c0c12cdb5f404ea91d3954264ae..8c43874c359da5024541c58c1cc7e743d4135b3d:/unix/uxnet.c diff --git a/unix/uxnet.c b/unix/uxnet.c index ad25ef5f..44b09c1d 100644 --- a/unix/uxnet.c +++ b/unix/uxnet.c @@ -208,13 +208,15 @@ SockAddr sk_namelookup(char *host, char **canonicalname) if ( (h = gethostbyname(host)) ) ret->family = AF_INET; } - if (ret->family == 0) + if (ret->family == 0) { ret->error = (h_errno == HOST_NOT_FOUND || h_errno == NO_DATA || h_errno == NO_ADDRESS ? "Host does not exist" : h_errno == TRY_AGAIN ? "Temporary name service failure" : "gethostbyname: unknown error"); + return ret; + } } #ifdef IPV6