Use the custom main context in SoupProxyResolverDefault
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 30 Mar 2011 07:41:33 +0000 (09:41 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 30 Mar 2011 15:10:20 +0000 (17:10 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=646201

libsoup/soup-proxy-resolver-default.c

index b0bcbac..b7554a8 100644 (file)
@@ -174,12 +174,18 @@ get_proxy_uri_async (SoupProxyURIResolver  *resolver,
 
        uri_string = soup_uri_to_string (uri, FALSE);
 
+       if (async_context)
+               g_main_context_push_thread_default (async_context);
+
        g_proxy_resolver_lookup_async (priv->gproxy_resolver,
                                       uri_string,
                                       cancellable ? g_object_ref (cancellable) : NULL,
                                       resolved_proxy,
                                       async_data);
 
+       if (async_context)
+               g_main_context_pop_thread_default (async_context);
+
        g_free (uri_string);
 }