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 Lennart Poettering
parent a7c1778a68
commit e8b83fa7c6

View file

@ -389,7 +389,8 @@ static void asyncns_cb(pa_mainloop_api*m, pa_io_event *e, int fd, pa_io_event_fl
goto fail;
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);