[gvfs] common: Increase mount timeout to 30 minutes



commit c0bd3138a60b2a389ac99540ac3bfecb700ef0ff
Author: Ross Lagerwall <rosslagerwall gmail com>
Date:   Sun Mar 8 21:39:54 2015 +0000

    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

 client/gdaemonmount.c       |    3 ++-
 common/gmountsource.c       |    9 +++++----
 common/gvfsdaemonprotocol.h |    4 ++--
 3 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/client/gdaemonmount.c b/client/gdaemonmount.c
index 97fb068..a24a0f5 100644
--- a/client/gdaemonmount.c
+++ b/client/gdaemonmount.c
@@ -34,6 +34,7 @@
 #include "gmountsource.h"
 #include "gmountoperationdbus.h"
 #include <gvfsdbus.h>
+#include <gvfsdaemonprotocol.h>
 
 /* Protects all fields of GDaemonMount that can change
    which at this point is just foreign_volume */
@@ -251,7 +252,7 @@ async_proxy_new_cb (GObject *source_object,
   mount_source = g_mount_operation_dbus_wrap (data->mount_operation, _g_daemon_vfs_get_async_bus ());
 
   /* 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_call_unmount (proxy,
                                 g_mount_source_get_dbus_id (mount_source),
diff --git a/common/gmountsource.c b/common/gmountsource.c
index e7f7d73..1f2014d 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 e74a5d2..218691a 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)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]