{
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);
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(the_trigger_agents_ht_by_domain->ht,
+ &iter.iter, trigger_agent, node.node) {
+ agent_update(trigger_agent, app);
+ }
+ rcu_read_unlock();
}
/*
*/
ret = uri_parse(default_reg_uri, &uri);
assert(ret);
- assert(config.agent_tcp_port.begin > 0);
- uri->port = config.agent_tcp_port.begin;
+ assert(the_config.agent_tcp_port.begin > 0);
+ uri->port = the_config.agent_tcp_port.begin;
sock = lttcomm_alloc_sock_from_uri(uri);
uri_free(uri);
goto error;
}
- for (port = config.agent_tcp_port.begin;
- port <= config.agent_tcp_port.end; port++) {
+ for (port = the_config.agent_tcp_port.begin;
+ port <= the_config.agent_tcp_port.end; port++) {
ret = lttcomm_sock_set_port(sock, (uint16_t) port);
if (ret) {
ERR("[agent-thread] Failed to set port %u on socket",
}
if (!bind_succeeded) {
- if (config.agent_tcp_port.begin == config.agent_tcp_port.end) {
+ if (the_config.agent_tcp_port.begin ==
+ the_config.agent_tcp_port.end) {
WARN("Another process is already using the agent port %i. "
- "Agent support will be deactivated.",
- config.agent_tcp_port.begin);
+ "Agent support will be deactivated.",
+ the_config.agent_tcp_port.begin);
goto error;
} else {
WARN("All ports in the range [%i, %i] are already in use. "
- "Agent support will be deactivated.",
- config.agent_tcp_port.begin,
- config.agent_tcp_port.end);
+ "Agent support will be deactivated.",
+ the_config.agent_tcp_port.begin,
+ the_config.agent_tcp_port.end);
goto error;
}
}
*/
static int write_agent_port(uint16_t port)
{
- return utils_create_pid_file((pid_t) port,
- config.agent_port_file_path.value);
+ return utils_create_pid_file(
+ (pid_t) port, the_config.agent_port_file_path.value);
}
static
rcu_thread_online();
/* Agent initialization call MUST be called before starting the thread. */
- assert(agent_apps_ht_by_sock);
+ assert(the_agent_apps_ht_by_sock);
/* Create pollset with size 2, quit pipe and registration socket. */
ret = lttng_poll_create(&events, 2, LTTNG_CLOEXEC);