]> git.ipfire.org Git - thirdparty/glibc.git/commit
gaih_inet: make numeric lookup a separate routine
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Mon, 7 Mar 2022 08:38:51 +0000 (14:08 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Fri, 15 Sep 2023 23:53:24 +0000 (19:53 -0400)
commit922f2614d69dc47922c1a8e8a08f2bd74874587e
tree3002b0ef9803ac8f2ff00a65c1cd928ccf4da9d3
parente05e5889b8a307fe4be55b03bcbd7a1c62fc2f2d
gaih_inet: make numeric lookup a separate routine

Introduce the gaih_result structure and general paradigm for cleanups
that follow to process the lookup request and return a result.  A lookup
function (like text_to_binary_address), should return an integer error
code and set members of gaih_result based on what it finds.  If the
function does not have a result and no errors have occurred during the
lookup, it should return 0 and res.at should be set to NULL, allowing a
subsequent function to do the lookup until we run out of options.

Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Reviewed-by: DJ Delorie <dj@redhat.com>
(cherry picked from commit 26dea461191cca519b498890a9682fe4bc8e4c2f)
sysdeps/posix/getaddrinfo.c