]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
fetch: support EAI_ADDRFAMILY error, correct two error messages
authorMike Karels <karels@FreeBSD.org>
Wed, 2 Nov 2022 15:59:09 +0000 (10:59 -0500)
committerMike Karels <karels@FreeBSD.org>
Sat, 3 Dec 2022 15:17:10 +0000 (09:17 -0600)
commit8d44502e7f6438e32bf1d9f48cbf341d3c985bed
tree7a23c958d3c200e117d345d35d77e7a52cce0fd3
parentf395174bbb2c6a0a7bba7b08364e8e5e289ef780
fetch: support EAI_ADDRFAMILY error, correct two error messages

With the change to return EAI_ADDRFAMILY from getaddrinfo(), fetch
would print "Unknown resolver error" for that error.  Add that error
and its string to libfetch's table, using an #ifdef just in case.
Correct error strings for EAI_NODATA (although it is currently unused)
and EAI_NONAME.  Should maybe rework the code to use gai_strerror(3),
but that doesn't map directly, and the current strings are shortened.

Reviewed in https://reviews.freebsd.org/D37139 with related changes.

Reviewed by:    bz

(cherry picked from commit 631b82aca0fd41c8e0d48eebdb9c4e38b7306472)
lib/libfetch/common.c