Use correct error string for getaddrinfo() and getnameinfo() failures.
[srvx.git] / src / mail-smtp.c
index 9ec083d0a31defd4b9c10beb9de98cfc3f608c13..b1b50955dc294296327b801b51b2ac4178e3ae6c 100644 (file)
@@ -138,7 +138,7 @@ static void smtp_fill_name(char *namebuf, size_t buflen)
     }
     res = getnameinfo(sa, sa_len, namebuf, buflen, NULL, 0, NI_NUMERICHOST);
     if (res != 0) {
-        log_module(MAIL_LOG, LOG_ERROR, "Unable to get text form of socket name: %s", strerror(errno));
+        log_module(MAIL_LOG, LOG_ERROR, "Unable to get text form of socket name: %s", gai_strerror(res));
     }
 }