[gvfs/gnome-3-10] daemon: Set infinite timeout for enumerate response
- From: Ross Lagerwall <rossl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs/gnome-3-10] daemon: Set infinite timeout for enumerate response
- Date: Thu, 23 Jan 2014 08:20:58 +0000 (UTC)
commit 62cadd576fb43c83aec8d0b9e5396e3c92dca23b
Author: Ross Lagerwall <rosslagerwall gmail com>
Date: Tue Dec 17 13:21:39 2013 +0200
daemon: Set infinite timeout for enumerate response
Set an infinite timeout for responses to enumerate() otherwise it can
timeout when enumerating large, slow directories.
https://bugzilla.gnome.org/show_bug.cgi?id=598092
daemon/gvfsjobenumerate.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/daemon/gvfsjobenumerate.c b/daemon/gvfsjobenumerate.c
index 9411e1e..c6516eb 100644
--- a/daemon/gvfsjobenumerate.c
+++ b/daemon/gvfsjobenumerate.c
@@ -117,16 +117,21 @@ create_enumerator_proxy (GVfsJobEnumerate *job)
{
GDBusConnection *connection;
const gchar *sender;
+ GVfsDBusEnumerator *proxy;
connection = g_dbus_method_invocation_get_connection (G_VFS_JOB_DBUS (job)->invocation);
sender = g_dbus_method_invocation_get_sender (G_VFS_JOB_DBUS (job)->invocation);
- return gvfs_dbus_enumerator_proxy_new_sync (connection,
- G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
- sender,
- job->object_path,
- NULL,
- NULL);
+ proxy = gvfs_dbus_enumerator_proxy_new_sync (connection,
+ G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
+ sender,
+ job->object_path,
+ NULL,
+ NULL);
+ g_assert (proxy != NULL);
+ g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (proxy), G_MAXINT);
+
+ return proxy;
}
static void
@@ -151,7 +156,6 @@ send_infos (GVfsJobEnumerate *job)
GVfsDBusEnumerator *proxy;
proxy = create_enumerator_proxy (job);
- g_assert (proxy != NULL);
gvfs_dbus_enumerator_call_got_info (proxy,
g_variant_builder_end (job->building_infos),
@@ -245,7 +249,6 @@ g_vfs_job_enumerate_done (GVfsJobEnumerate *job)
send_infos (job);
proxy = create_enumerator_proxy (job);
- g_assert (proxy != NULL);
gvfs_dbus_enumerator_call_done (proxy,
NULL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]