int agent_disable_event(struct agent_event *event,
enum lttng_domain_type domain)
{
- int ret;
+ int ret = LTTNG_OK;
struct agent_app *app;
struct lttng_ht_iter iter;
assert(event);
+ if (!event->enabled) {
+ goto end;
+ }
rcu_read_lock();
}
event->enabled = 0;
- ret = LTTNG_OK;
error:
rcu_read_unlock();
+end:
return ret;
}
struct lttng_ht_node_ulong *node;
struct lttng_ht_iter iter;
+ if (!agent_apps_ht_by_sock) {
+ return;
+ }
rcu_read_lock();
cds_lfht_for_each_entry(agent_apps_ht_by_sock->ht, &iter.iter, node, node) {
struct agent_app *app;