[gvfs] Implement clean shutdown in mtp backend



commit 91bd02a0e3216d7b901405b7636055881867bf92
Author: Timothy Arceri <t_arceri yahoo com au>
Date:   Wed May 8 21:33:13 2013 +1000

    Implement clean shutdown in mtp backend
    
    https://bugzilla.gnome.org/show_bug.cgi?id=511802

 daemon/gvfsbackendmtp.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gvfsbackendmtp.c b/daemon/gvfsbackendmtp.c
index cbdbb02..028db2b 100644
--- a/daemon/gvfsbackendmtp.c
+++ b/daemon/gvfsbackendmtp.c
@@ -541,8 +541,7 @@ on_uevent (GUdevClient *client, gchar *action, GUdevDevice *device, gpointer use
   if (g_strcmp0 (op_backend->dev_path, dev_path) == 0 &&
       g_str_equal (action, "remove")) {
     DEBUG ("(I) on_uevent: Quiting after remove event on device %s", dev_path);
-    /* TODO: need a cleaner way to force unmount ourselves */
-    exit (1);
+    g_vfs_backend_force_unmount ((GVfsBackend*)op_backend);
   }
 
   DEBUG ("(I) on_uevent done.");


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