SoW-2020-0002: Trace Hit Counters: trigger error reporting integration
[lttng-tools.git] / src / bin / lttng-sessiond / agent-thread.c
index 06ef377a3a181c1b7528df89b076340f789c0f70..44f41059bc7ae2cd277b590a67423cc4a9df7b7c 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,14 @@ static void update_agent_app(const struct agent_app *app)
                session_unlock(session);
                session_put(session);
        }
+
+       /* Do we need more locking here? maybe against trigger add? */
+       rcu_read_lock();
+       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.033057 seconds and 5 git commands to generate.