[tracker/gdbus-porting] libtracker-miner: Don't redefine an error to propogate up, use passed GError



commit 23d7fff9c30d099fe33e414798bf4c840ae1740c
Author: Martyn Russell <martyn lanedo com>
Date:   Tue Jan 4 10:55:25 2011 +0000

    libtracker-miner: Don't redefine an error to propogate up, use passed GError

 src/libtracker-miner/tracker-miner-manager.c |   26 ++++++++------------------
 1 files changed, 8 insertions(+), 18 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-manager.c b/src/libtracker-miner/tracker-miner-manager.c
index df801e2..5f625b2 100644
--- a/src/libtracker-miner/tracker-miner-manager.c
+++ b/src/libtracker-miner/tracker-miner-manager.c
@@ -1151,7 +1151,6 @@ tracker_miner_manager_reindex_by_mimetype (TrackerMinerManager  *manager,
                                            GError              **error)
 {
 	TrackerMinerManagerPrivate *priv;
-	GError *internal_error = NULL;
 	GVariant *v;
 
 	g_return_val_if_fail (TRACKER_IS_MINER_MANAGER (manager), FALSE);
@@ -1178,18 +1177,14 @@ tracker_miner_manager_reindex_by_mimetype (TrackerMinerManager  *manager,
 	                                 G_DBUS_CALL_FLAGS_NONE,
 	                                 -1,
 	                                 NULL,
-	                                 &internal_error);
+	                                 error);
 
 	if (v) {
 		g_variant_unref (v);
+		return TRUE;
 	}
 
-	if (internal_error) {
-		g_propagate_error (error, internal_error);
-		return FALSE;
-	}
-
-	return TRUE;
+	return FALSE;
 }
 
 /**
@@ -1210,7 +1205,6 @@ tracker_miner_manager_index_file (TrackerMinerManager  *manager,
                                   GError              **error)
 {
 	TrackerMinerManagerPrivate *priv;
-	GError *internal_error = NULL;
 	gchar *uri;
 	GVariant *v;
 
@@ -1248,18 +1242,14 @@ tracker_miner_manager_index_file (TrackerMinerManager  *manager,
 	                                 G_DBUS_CALL_FLAGS_NONE,
 	                                 -1,
 	                                 NULL,
-	                                 &internal_error);
-
-	if (v) {
-		g_variant_unref (v);
-	}
+	                                 error);
 
 	g_free (uri);
 
-	if (internal_error) {
-		g_propagate_error (error, internal_error);
-		return FALSE;
+	if (v) {
+		g_variant_unref (v);
+		return TRUE;
 	}
 
-	return TRUE;
+	return FALSE;
 }



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