[gvfs/gdbus] gdbus: Remove callbacks for calls where we don't care about the result



commit 4f872494367e0503e5ddda17daebd7f541db4e0a
Author: Tomas Bzatek <tbzatek redhat com>
Date:   Wed May 23 11:56:32 2012 +0200

    gdbus: Remove callbacks for calls where we don't care about the result
    
    Found by reading GDBus sources, things are easier when not specifying
    a callback, e.g. g_dbus_connection_call() would set the
    G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED flag on the outgoing message.

 client/gdaemonvfs.c |   20 ++------------------
 1 files changed, 2 insertions(+), 18 deletions(-)
---
diff --git a/client/gdaemonvfs.c b/client/gdaemonvfs.c
index d8dc923..1961dd7 100644
--- a/client/gdaemonvfs.c
+++ b/client/gdaemonvfs.c
@@ -1452,14 +1452,6 @@ g_daemon_vfs_local_file_set_attributes (GVfs       *vfs,
 }
 
 static void
-metadata_remove_cb (GVfsMetadata *proxy,
-                    GAsyncResult *res,
-                    gpointer user_data)
-{
-  gvfs_metadata_call_remove_finish (proxy, res, NULL);
-}
-
-static void
 g_daemon_vfs_local_file_removed (GVfs       *vfs,
 				 const char *filename)
 {
@@ -1486,7 +1478,7 @@ g_daemon_vfs_local_file_removed (GVfs       *vfs,
                                      metatreefile,
                                      tree_path,
                                      NULL,
-                                     (GAsyncReadyCallback) metadata_remove_cb,
+                                     NULL, /* callback */
                                      NULL);
         }
       
@@ -1498,14 +1490,6 @@ g_daemon_vfs_local_file_removed (GVfs       *vfs,
 }
 
 static void
-metadata_move_cb (GVfsMetadata *proxy,
-                  GAsyncResult *res,
-                  gpointer user_data)
-{
-  gvfs_metadata_call_move_finish (proxy, res, NULL);
-}
-
-static void
 g_daemon_vfs_local_file_moved (GVfs       *vfs,
 			       const char *source,
 			       const char *dest)
@@ -1539,7 +1523,7 @@ g_daemon_vfs_local_file_moved (GVfs       *vfs,
                                    tree_path1,
                                    tree_path2,
                                    NULL,
-                                   (GAsyncReadyCallback) metadata_move_cb,
+                                   NULL, /* callback */
                                    NULL);
         }
     }



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