[tracker-miners/wip/carlosg/tracker-3.0-api-breaks: 11/25] libtracker-miner: Don't second guess sparql connection in TrackerMiner



commit 23880082fc65d884a1b5ae64bd6cff2648e72681
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Dec 31 01:45:12 2019 +0100

    libtracker-miner: Don't second guess sparql connection in TrackerMiner
    
    Make miners always require an explicit connection.

 src/libtracker-miner/tracker-miner-object.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-object.c b/src/libtracker-miner/tracker-miner-object.c
index 4bea37c5d..a4c79f8b4 100644
--- a/src/libtracker-miner/tracker-miner-object.c
+++ b/src/libtracker-miner/tracker-miner-object.c
@@ -295,15 +295,12 @@ miner_initable_init (GInitable     *initable,
                      GError       **error)
 {
        TrackerMiner *miner = TRACKER_MINER (initable);
-       GError *inner_error = NULL;
 
        if (!miner->priv->connection) {
-               /* Try to get SPARQL connection... */
-               miner->priv->connection = tracker_sparql_connection_get (NULL, &inner_error);
-       }
-
-       if (!miner->priv->connection) {
-               g_propagate_error (error, inner_error);
+               g_set_error (error,
+                            TRACKER_MINER_ERROR,
+                            TRACKER_MINER_ERROR_NAME_MISSING,
+                            "No SPARQL connection");
                return FALSE;
        }
 


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