gresolver: Ensure GThreadedResolver always sets an error if resolution fails
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Thu, 24 Apr 2014 08:26:12 +0000 (09:26 +0100)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Fri, 25 Apr 2014 08:52:01 +0000 (09:52 +0100)
commit956921e51facfab7e7706257ba5a976d011f97a5
tree1245f316604dbeb2d7f51ff0373ac387d89affbe
parent14b0c15abb228c1e4c5400595cd7c0ff8d86bfbd
gresolver: Ensure GThreadedResolver always sets an error if resolution fails

It was previously possible for GThreadedResolver to return an empty list
and no error in response to a g_resolver_lookup_by_name() call, if it
happened that all the addresses returned by getaddrinfo() could not be
converted from native addresses to GSocketAddresses.

Fix that by setting a G_RESOLVER_ERROR_NOT_FOUND if the returned list is
empty.

https://bugzilla.gnome.org/show_bug.cgi?id=728776
gio/gthreadedresolver.c