[glib] GUnixVolume: implement _finish functions



commit ffe4e94e3afa16c4e28d6e299f68d8a7ca408b8c
Author: Ryan Lortie <desrt desrt ca>
Date:   Tue Mar 11 12:19:19 2014 -0400

    GUnixVolume: implement _finish functions
    
    The _finish functions for GUnixVolume _mount and _eject functions were
    never implemented, having been simply stubbed out as 'return TRUE;'.
    
    Implement them.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=724916

 gio/gunixvolume.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gio/gunixvolume.c b/gio/gunixvolume.c
index 0ebcda7..1c12505 100644
--- a/gio/gunixvolume.c
+++ b/gio/gunixvolume.c
@@ -343,7 +343,9 @@ g_unix_volume_mount_finish (GVolume        *volume,
                             GAsyncResult  *result,
                             GError       **error)
 {
-  return TRUE;
+  g_return_val_if_fail (g_task_is_valid (result, volume), FALSE);
+
+  return g_task_propagate_boolean (G_TASK (result), error);
 }
 
 static void
@@ -366,7 +368,9 @@ g_unix_volume_eject_finish (GVolume       *volume,
                             GAsyncResult  *result,
                             GError       **error)
 {
-  return TRUE;
+  g_return_val_if_fail (g_task_is_valid (result, volume), FALSE);
+
+  return g_task_propagate_boolean (G_TASK (result), error);
 }
 
 static gchar *


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