[gvfs] dnssd: Run GSimpleAsyncResult completion in idle
- From: Ross Lagerwall <rossl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] dnssd: Run GSimpleAsyncResult completion in idle
- Date: Sat, 14 Mar 2015 15:19:59 +0000 (UTC)
commit a4c4ae6006cecc2bfe1519a669d4e15ff856e82f
Author: Ross Lagerwall <rosslagerwall gmail com>
Date: Sun Mar 8 00:38:15 2015 +0000
dnssd: Run GSimpleAsyncResult completion in idle
g_simple_async_result_complete should only be used from the thread on
which the callback should be invoked. Also, the gvfs job threads do not
have their own GMainContexts which causes an assertion failure [1] when
invoking g_simple_async_result_complete. Instead, use
g_simple_async_result_complete_in_idle().
[1] (process:11772): GLib-CRITICAL **: g_main_context_push_thread_default: assertion 'acquired_context'
failed
https://bugzilla.gnome.org/show_bug.cgi?id=629345
common/gvfsdnssdresolver.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/common/gvfsdnssdresolver.c b/common/gvfsdnssdresolver.c
index 59f640f..a63cb45 100644
--- a/common/gvfsdnssdresolver.c
+++ b/common/gvfsdnssdresolver.c
@@ -1066,7 +1066,7 @@ service_resolver_changed (GVfsDnsSdResolver *resolver,
if (resolver->is_resolved)
{
g_simple_async_result_set_op_res_gboolean (data->simple, TRUE);
- g_simple_async_result_complete (data->simple);
+ g_simple_async_result_complete_in_idle (data->simple);
resolve_data_free (data);
}
else
@@ -1089,7 +1089,7 @@ service_resolver_changed (GVfsDnsSdResolver *resolver,
data->resolver->service_type,
data->resolver->service_name,
data->resolver->domain);
- g_simple_async_result_complete (data->simple);
+ g_simple_async_result_complete_in_idle (data->simple);
resolve_data_free (data);
}
}
@@ -1134,7 +1134,7 @@ service_resolver_timed_out (ResolveData *data)
data->resolver->domain);
}
- g_simple_async_result_complete (data->simple);
+ g_simple_async_result_complete_in_idle (data->simple);
data->timeout_id = 0;
resolve_data_free (data);
return FALSE;
@@ -1175,7 +1175,7 @@ g_vfs_dns_sd_resolver_resolve (GVfsDnsSdResolver *resolver,
if (resolver->is_resolved)
{
g_simple_async_result_set_op_res_gboolean (simple, TRUE);
- g_simple_async_result_complete (simple);
+ g_simple_async_result_complete_in_idle (simple);
g_object_unref (simple);
goto out;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]