[tracker-miners/sam/app-domains] tracker-miner-fs: Honour domain when (re)starting tracker-extract
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/sam/app-domains] tracker-miner-fs: Honour domain when (re)starting tracker-extract
- Date: Sun, 1 Jul 2018 19:23:31 +0000 (UTC)
commit 5013618789083b323e473ddfb9e035021058b075
Author: Sam Thursfield <sam afuera me uk>
Date: Sun Jul 1 20:10:33 2018 +0200
tracker-miner-fs: Honour domain when (re)starting tracker-extract
When a custom domain is being used, we shouldn't try to watch
org.freedesktop.Tracker.Miner.Extract on DBus, we should use the
correct domain-specific name instead.
src/miners/fs/tracker-extract-watchdog.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/src/miners/fs/tracker-extract-watchdog.c b/src/miners/fs/tracker-extract-watchdog.c
index 955e24600..80da0a177 100644
--- a/src/miners/fs/tracker-extract-watchdog.c
+++ b/src/miners/fs/tracker-extract-watchdog.c
@@ -95,18 +95,31 @@ static void
extract_watchdog_start (TrackerExtractWatchdog *watchdog,
gboolean autostart)
{
+ gchar *domain_name, *tracker_extract_dbus_name;
+
g_debug ("Setting up watch on tracker-extract (autostart: %s)",
autostart ? "yes" : "no");
+ domain_name = tracker_sparql_connection_get_domain();
+
+ if (domain_name == NULL) {
+ tracker_extract_dbus_name = g_strdup (TRACKER_MINER_DBUS_NAME_PREFIX "Extract");
+ } else {
+ tracker_extract_dbus_name = g_strconcat(domain_name, ".Tracker1.Miner.Extract", NULL);
+ }
+
watchdog->extractor_watchdog_id =
g_bus_watch_name (TRACKER_IPC_BUS,
- TRACKER_MINER_DBUS_NAME_PREFIX "Extract",
+ tracker_extract_dbus_name,
(autostart ?
G_BUS_NAME_WATCHER_FLAGS_AUTO_START :
G_BUS_NAME_WATCHER_FLAGS_NONE),
extract_watchdog_name_appeared,
extract_watchdog_name_vanished,
watchdog, NULL);
+
+ g_free (tracker_extract_dbus_name);
+ g_free (domain_name);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]