summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorRoss Lagerwall <rosslagerwall@gmail.com>2015-03-08 21:39:54 +0000
committerRoss Lagerwall <rosslagerwall@gmail.com>2015-03-11 23:03:41 +0000
commitc0bd3138a60b2a389ac99540ac3bfecb700ef0ff (patch)
tree8b2abd9c6f1da5c132796a071551c529bddc1056 /common
parentf7f18bb6e7576672c2240c8ead8dfa4a2668d478 (diff)
downloadgvfs-c0bd3138a60b2a389ac99540ac3bfecb700ef0ff.tar.gz
common: Increase mount timeout to 30 minutes
Although it is probably unnecessary, wait up to 30 minutes for a mount to complete. This allows plenty of time to wait for a password dialog. It also makes it more consistent with many of the other operations which use a timeout of 30 minutes. https://bugzilla.gnome.org/show_bug.cgi?id=594500
Diffstat (limited to 'common')
-rw-r--r--common/gmountsource.c9
-rw-r--r--common/gvfsdaemonprotocol.h4
2 files changed, 7 insertions, 6 deletions
diff --git a/common/gmountsource.c b/common/gmountsource.c
index e7f7d732..1f2014de 100644
--- a/common/gmountsource.c
+++ b/common/gmountsource.c
@@ -25,6 +25,7 @@
#include <gmountsource.h>
#include <gio/gio.h>
#include <gvfsdbus.h>
+#include "gvfsdaemonprotocol.h"
#include <string.h>
@@ -280,7 +281,7 @@ g_mount_source_ask_password_async (GMountSource *source,
return;
/* 30 minute timeout */
- g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (proxy), 1000 * 60 * 30);
+ g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (proxy), G_VFS_DBUS_MOUNT_TIMEOUT_MSECS);
result = g_simple_async_result_new (G_OBJECT (source), callback, user_data,
g_mount_source_ask_password_async);
@@ -618,7 +619,7 @@ g_mount_source_ask_question_async (GMountSource *source,
return;
/* 30 minute timeout */
- g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (proxy), 1000 * 60 * 30);
+ g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (proxy), G_VFS_DBUS_MOUNT_TIMEOUT_MSECS);
result = g_simple_async_result_new (G_OBJECT (source), callback, user_data,
g_mount_source_ask_question_async);
@@ -778,7 +779,7 @@ g_mount_source_show_processes_async (GMountSource *source,
return;
/* 30 minute timeout */
- g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (proxy), 1000 * 60 * 30);
+ g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (proxy), G_VFS_DBUS_MOUNT_TIMEOUT_MSECS);
result = g_simple_async_result_new (G_OBJECT (source), callback, user_data,
g_mount_source_show_processes_async);
@@ -955,7 +956,7 @@ g_mount_source_show_unmount_progress (GMountSource *source,
return;
/* 30 minute timeout */
- g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (proxy), 1000 * 60 * 30);
+ g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (proxy), G_VFS_DBUS_MOUNT_TIMEOUT_MSECS);
gvfs_dbus_mount_operation_call_show_unmount_progress (proxy,
message_string ? message_string : "",
diff --git a/common/gvfsdaemonprotocol.h b/common/gvfsdaemonprotocol.h
index e74a5d24..218691ac 100644
--- a/common/gvfsdaemonprotocol.h
+++ b/common/gvfsdaemonprotocol.h
@@ -14,8 +14,8 @@ G_BEGIN_DECLS
#define G_VFS_DBUS_METADATA_NAME "org.gtk.vfs.Metadata"
#define G_VFS_DBUS_METADATA_PATH "/org/gtk/vfs/metadata"
-/* Mounts time out in 10 minutes, since they can be slow, with auth, etc */
-#define G_VFS_DBUS_MOUNT_TIMEOUT_MSECS (1000*60*10)
+/* Mounts time out in 30 minutes, since they can be slow, with auth, etc */
+#define G_VFS_DBUS_MOUNT_TIMEOUT_MSECS (1000*60*30)
/* Normal ops are faster, one minute timeout */
#define G_VFS_DBUS_TIMEOUT_MSECS (1000*60)