]> code.delx.au - pulseaudio/commitdiff
socket-client: properly handle asyncns failures
authorJez Austin <jezaustin@gmail.com>
Mon, 22 Mar 2010 15:09:34 +0000 (16:09 +0100)
committerColin Guthrie <cguthrie@mandriva.org>
Sat, 8 May 2010 13:21:01 +0000 (14:21 +0100)
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

src/pulsecore/socket-client.c

index ef3c29ee3e9a49f604e3cab4d19ad01b454b93c1..7c449bee2f5f0d9904de6f670e435e513772b0e0 100644 (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;
 
     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);