[tracker/wip/carlosg/fix-flaky-timeouts: 2/2] libtracker-sparql: Set up default object path before subscription



commit ab794b392929574958c2892163c18f049c6875ba
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Jun 27 14:25:25 2020 +0200

    libtracker-sparql: Set up default object path before subscription
    
    We need this for comparing correctly with the SPARQL bus connection,
    otherwise we are comparing NULL object path with the default
    /org/freedesktop/Tracker3/Endpoint

 src/libtracker-sparql/tracker-notifier.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-sparql/tracker-notifier.c b/src/libtracker-sparql/tracker-notifier.c
index 22afeda66..4f607f056 100644
--- a/src/libtracker-sparql/tracker-notifier.c
+++ b/src/libtracker-sparql/tracker-notifier.c
@@ -766,11 +766,12 @@ tracker_notifier_signal_subscribe (TrackerNotifier *notifier,
 
        priv = tracker_notifier_get_instance_private (notifier);
 
-       subscription = tracker_notifier_subscription_new (notifier, connection,
-                                                         service, object_path);
        if (!object_path)
                object_path = DEFAULT_OBJECT_PATH;
 
+       subscription = tracker_notifier_subscription_new (notifier, connection,
+                                                         service, object_path);
+
        subscription->handler_id =
                g_dbus_connection_signal_subscribe (connection,
                                                    service,


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