summaryrefslogtreecommitdiff
path: root/test/internals
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2018-06-04 16:27:46 +0100
committerSimon McVittie <smcv@collabora.com>2018-06-04 17:50:51 +0100
commit60cedd0cfd775c9fcf7260e12af9b2ffeefc2bbe (patch)
tree34ddb4ae802b5aaf0c2355f147dc555d8bfea60d /test/internals
parent7c7786ae27d8945ebd7fd3b380c27ad6c5965373 (diff)
downloaddbus-60cedd0cfd775c9fcf7260e12af9b2ffeefc2bbe.tar.gz
sysdeps-unix: Handle errors from getaddrinfo correctly
getaddrinfo and getnameinfo have their own error-handling convention in which the library call returns either 0 or an EAI_* error code unrelated to errno. If the error code is not EAI_SYSTEM, then the value of errno is undefined (in particular it might be carried over from a previous system call or library call). Introduce a new helper function _dbus_error_from_gai() to handle this. The equivalent code paths in Windows appear to be OK: the Windows implementation of getaddrinfo() is documented to return a Winsock error code, which we seem to be handling correctly. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=106395
Diffstat (limited to 'test/internals')
0 files changed, 0 insertions, 0 deletions