[tracker/gdbus: 48/74] miner-fs: Fix (ssh) argument passing of GetMetadataFast, FD passing



commit 761c0d4ad4e9eee7c7cd35b7cc78409c25292731
Author: Philip Van Hoof <philip codeminded be>
Date:   Thu Jan 6 12:41:02 2011 +0100

    miner-fs: Fix (ssh) argument passing of GetMetadataFast, FD passing

 src/miners/fs/tracker-miner-files.c |   21 +++++++--------------
 1 files changed, 7 insertions(+), 14 deletions(-)
---
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index 88bc474..61f04df 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -2002,8 +2002,6 @@ get_metadata_fast_async (GDBusConnection *connection,
                          ProcessFileData *user_data)
 {
 	GDBusMessage *message;
-	GVariant *arguments;
-	GVariantBuilder arguments_builder;
 	GUnixFDList *fd_list;
 	FastAsyncData *data;
 	int pipefd[2];
@@ -2023,23 +2021,18 @@ get_metadata_fast_async (GDBusConnection *connection,
 	                                          TRACKER_DBUS_INTERFACE_EXTRACT,
 	                                          "GetMetadataFast");
 
-	g_variant_builder_init (&arguments_builder, G_VARIANT_TYPE_TUPLE);
-
 	fd_list = g_unix_fd_list_new ();
 
-	g_variant_builder_add (&arguments_builder, "(ssh)",
-	                       uri,
-	                       mime_type,
-	                       g_unix_fd_list_append (fd_list,
-	                                              pipefd[1],
-	                                              NULL));
+	g_dbus_message_set_body (message, g_variant_new ("(ssh)",
+	                                                 uri,
+	                                                 mime_type,
+	                                                 g_unix_fd_list_append (fd_list,
+	                                                                        pipefd[1],
+	                                                                        NULL)));
+	g_dbus_message_set_unix_fd_list (message, fd_list);
 
 	close (pipefd[1]);
 
-	arguments = g_variant_builder_end (&arguments_builder);
-	g_dbus_message_set_body (message, arguments);
-	g_dbus_message_set_unix_fd_list (message, fd_list);
-
 	g_object_unref (fd_list);
 
 	data = fast_async_data_new (callback,



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