Commit 70e8eed6 authored by Dan Winship's avatar Dan Winship

Fix GResolver for g_simple_async_result_set_op_res_gpointer change

Previously, re-setting the pointer value would cause the old
GDestroyNotify to be lost; now it causes it to be run.
parent d589da7e
......@@ -245,14 +245,12 @@ g_resolver_lookup_by_name_async (GResolver *resolver,
if (addr)
GSimpleAsyncResult *simple;
GList *addrs;
simple = g_simple_async_result_new (G_OBJECT (resolver),
callback, user_data,
addrs = g_list_append (NULL, addr);
g_simple_async_result_set_op_res_gpointer (simple, addrs, (GDestroyNotify)g_resolver_free_addresses);
g_simple_async_result_set_op_res_gpointer (simple, addr, g_object_unref);
g_simple_async_result_complete_in_idle (simple);
g_object_unref (simple);
......@@ -302,11 +300,10 @@ g_resolver_lookup_by_name_finish (GResolver *resolver,
/* Handle the stringified-IP-addr case */
if (g_simple_async_result_get_source_tag (simple) == g_resolver_lookup_by_name_async)
GList *addrs;
GInetAddress *addr;
addrs = g_simple_async_result_get_op_res_gpointer (simple);
g_simple_async_result_set_op_res_gpointer (simple, NULL, NULL);
return addrs;
addr = g_simple_async_result_get_op_res_gpointer (simple);
return g_list_append (NULL, g_object_ref (addr));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment