proxy/gnome: fix up threading issues and other bugs
authorDan Winship <danw@gnome.org>
Mon, 28 Jan 2013 15:45:31 +0000 (10:45 -0500)
committerDan Winship <danw@gnome.org>
Tue, 5 Feb 2013 15:03:55 +0000 (10:03 -0500)
commit55f2bb4a47e4e450f1d065bcfe242cafcacc571e
tree4199f2f470395823a7d2ea58e17d09731fe40120
parent088352010220c82559caa6899d88157c8827d66f
proxy/gnome: fix up threading issues and other bugs

We had a mutex to deal with the possibility of multi-threaded use, but
were unlocking it too soon, so there wasn't any actual thread safety
(or at least, not much) if GProxyResolverGnome was being used from
multiple threads at the moment that the GSettings were changed.

Additionally, lookup_async() wasn't noticing updates to the settings
if they switched from automatic to manual/direct, and if they switched
from in the other direction, then the first lookup_async() call after
the change would end up making a synchronous call to the pacrunner.

Also, fix two cases where an operation could return both a list of
proxies and a GError.
proxy/gnome/gproxyresolvergnome.c