[tracker/gdbus] plugins/evolution: Don't use async-update, it's in a thread already



commit 06534d585ebff9cecfe5c53c83606f2189ce2871
Author: Philip Van Hoof <philip codeminded be>
Date:   Thu Oct 28 10:58:29 2010 +0200

    plugins/evolution: Don't use async-update, it's in a thread already
    
    This avoids hammering and exhausting tracker-store's FDs

 src/plugins/evolution/tracker-evolution-plugin.c |   27 +++++-----------------
 1 files changed, 6 insertions(+), 21 deletions(-)
---
diff --git a/src/plugins/evolution/tracker-evolution-plugin.c b/src/plugins/evolution/tracker-evolution-plugin.c
index 6637756..961ea29 100644
--- a/src/plugins/evolution/tracker-evolution-plugin.c
+++ b/src/plugins/evolution/tracker-evolution-plugin.c
@@ -334,22 +334,6 @@ thread_pool_exec (gpointer data, gpointer user_data)
 		pool->freeup (data, pool->cancel);
 }
 
-static void
-reply_void (GObject *source_object,
-            GAsyncResult *result,
-            gpointer user_data)
-{
-	GError *error = NULL;
-
-	tracker_sparql_connection_update_finish (TRACKER_SPARQL_CONNECTION (source_object),
-	                                         result, &error);
-
-	if (error) {
-		g_debug ("Tracker plugin: Error updating data: %s\n", error->message);
-		g_error_free (error);
-	}
-}
-
 static ThreadPool*
 thread_pool_new (GFunc func, GFunc freeup, GCompareDataFunc sorter)
 {
@@ -411,11 +395,12 @@ send_sparql_update (TrackerEvolutionPlugin *self, const gchar *sparql, gint prio
 	TrackerEvolutionPluginPrivate *priv = TRACKER_EVOLUTION_PLUGIN_GET_PRIVATE (self);
 
 	if (priv->connection) {
-		tracker_sparql_connection_update_async (priv->connection,
-		                                        sparql,
-		                                        G_PRIORITY_DEFAULT,
-		                                        NULL,
-		                                        reply_void, NULL);
+		tracker_sparql_connection_update (priv->connection,
+		                                  sparql,
+		                                  G_PRIORITY_DEFAULT,
+		                                  NULL,
+		                                  NULL);
+
 	}
 }
 



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