[tracker/wip/carlosg/domain-ontologies: 111/124] tracker-miner-rss: If there is a domain, set watch on it
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/domain-ontologies: 111/124] tracker-miner-rss: If there is a domain, set watch on it
- Date: Thu, 29 Jun 2017 18:48:27 +0000 (UTC)
commit 1cfa4f1458525dc67306c538045d38470a67a543
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Jun 21 21:11:42 2017 +0200
tracker-miner-rss: If there is a domain, set watch on it
And exit as soon as the name vanishes. It may safely continue
its operations on the next startup.
src/miners/rss/tracker-main.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/miners/rss/tracker-main.c b/src/miners/rss/tracker-main.c
index a8da957..ac6b9e1 100644
--- a/src/miners/rss/tracker-main.c
+++ b/src/miners/rss/tracker-main.c
@@ -59,6 +59,15 @@ static GOptionEntry entries[] = {
{ NULL }
};
+static void
+on_domain_vanished (GDBusConnection *connection,
+ const gchar *name,
+ gpointer user_data)
+{
+ GMainLoop *loop = user_data;
+ g_main_loop_quit (loop);
+}
+
int
main (int argc, char **argv)
{
@@ -207,6 +216,14 @@ main (int argc, char **argv)
}
loop = g_main_loop_new (NULL, FALSE);
+
+ if (domain_ontology && domain_ontology_name) {
+ g_bus_watch_name_on_connection (connection, domain_ontology_name,
+ G_BUS_NAME_WATCHER_FLAGS_NONE,
+ NULL, on_domain_vanished,
+ loop, NULL);
+ }
+
g_main_loop_run (loop);
tracker_log_shutdown ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]