sessiond: agent: enable events matching event notifiers
[lttng-tools.git] / src / bin / lttng-sessiond / agent-thread.c
index 06ef377a3a181c1b7528df89b076340f789c0f70..2015498ff59a178bf76e26eb5d092e1e3a748e87 100644 (file)
@@ -59,6 +59,8 @@ static void update_agent_app(const struct agent_app *app)
 {
        struct ltt_session *session, *stmp;
        struct ltt_session_list *list;
+       struct agent *trigger_agent;
+       struct lttng_ht_iter iter;
 
        list = session_get_list();
        assert(list);
@@ -82,6 +84,17 @@ static void update_agent_app(const struct agent_app *app)
                session_unlock(session);
                session_put(session);
        }
+
+       rcu_read_lock();
+       /*
+        * We are protected against the addition of new events by the session
+        * list lock being held.
+        */
+       cds_lfht_for_each_entry (trigger_agents_ht_by_domain->ht, &iter.iter,
+                       trigger_agent, node.node) {
+               agent_update(trigger_agent, app);
+       }
+       rcu_read_unlock();
 }
 
 /*
This page took 0.023573 seconds and 4 git commands to generate.