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



commit 6ae88577e4a178291e2fc537ce43ee7a48c17dc6
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]