[tracker-miners/wip/carlosg/tracker-3.0-api-breaks: 14/25] tracker-miner-rss: Drop GError array return value on update_array()



commit e7e7ede6921601fed63daef3436c0313559a436d
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Dec 31 01:52:37 2019 +0100

    tracker-miner-rss: Drop GError array return value on update_array()
    
    This is an API change wrt tracker 2.0. The update_array operation is
    now atomic and returns a single error for the whole transaction.

 src/miners/rss/tracker-miner-rss.c | 20 +++-----------------
 1 file changed, 3 insertions(+), 17 deletions(-)
---
diff --git a/src/miners/rss/tracker-miner-rss.c b/src/miners/rss/tracker-miner-rss.c
index e3a783e4c..4f257f66d 100644
--- a/src/miners/rss/tracker-miner-rss.c
+++ b/src/miners/rss/tracker-miner-rss.c
@@ -786,30 +786,16 @@ feed_channel_content_update_cb (GObject      *source,
                                 gpointer      user_data)
 {
        TrackerSparqlConnection *connection;
-       GPtrArray *errors, *array = user_data;
+       GPtrArray *array = user_data;
        GError *error = NULL;
        guint i;
 
        connection = TRACKER_SPARQL_CONNECTION (source);
-       errors = tracker_sparql_connection_update_array_finish (connection,
-                                                               result, &error);
-
-       if (error) {
+       if (!tracker_sparql_connection_update_array_finish (connection,
+                                                           result, &error)) {
                g_warning ("Could not update feed items: %s",
                           error->message);
                g_error_free (error);
-       } else {
-               for (i = 0; i < errors->len; i++) {
-                       GError *error = g_ptr_array_index (errors, i);
-
-                       if (!error)
-                               continue;
-
-                       g_warning ("Error in item %d of update: %s\nQuery: %s", i,
-                                  error->message, (gchar *) g_ptr_array_index (array, i));
-               }
-
-               g_ptr_array_unref (errors);
        }
 
        g_ptr_array_unref (array);


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