socket-client: properly handle asyncns failures

We fail to detect when people disable IPv6 in there kernels. This patch
makes sure we don't ignore this error condition.

http://pulseaudio.org/ticket/752
https://bugzilla.mozilla.org/show_bug.cgi?id=533470
http://bugs.freedesktop.org/show_bug.cgi?id=25742
This commit is contained in:
Jez Austin 2010-03-22 16:09:34 +01:00 committed by Colin Guthrie
parent dfcaa9325c
commit 74591da68b

View file

@ -387,7 +387,8 @@ static void asyncns_cb(pa_mainloop_api*m, pa_io_event *e, int fd, pa_io_event_fl
goto fail; goto fail;
if (res->ai_addr) if (res->ai_addr)
sockaddr_prepare(c, res->ai_addr, res->ai_addrlen); if (sockaddr_prepare(c, res->ai_addr, res->ai_addrlen) < 0)
goto fail;
asyncns_freeaddrinfo(res); asyncns_freeaddrinfo(res);