-#if 0
- case LTTNG_DOMAIN_UST_EXEC_NAME:
- case LTTNG_DOMAIN_UST_PID:
- case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
-#endif
- default:
- ret = LTTCOMM_UND;
+
+ do {
+ aevent = caa_container_of(node, struct agent_event, node);
+ ret = event_agent_disable_one(usess, agt, aevent);
+
+ if (ret != LTTNG_OK) {
+ goto end;
+ }
+
+ /* Get next duplicate agent event by name. */
+ agent_event_next_duplicate(event_name, agt, &iter);
+ node = lttng_ht_iter_get_node_str(&iter);
+ } while (node);
+end:
+ rcu_read_unlock();
+ return ret;
+}
+/*
+ * Disable all agent event for a given UST session.
+ *
+ * Return LTTNG_OK on success or else a LTTNG_ERR* code.
+ */
+int event_agent_disable_all(struct ltt_ust_session *usess,
+ struct agent *agt)
+{
+ int ret;
+ struct agent_event *aevent;
+ struct lttng_ht_iter iter;
+
+ assert(agt);
+ assert(usess);
+
+ /*
+ * Disable event on agent application. Continue to disable all other events
+ * if the * event is not found.
+ */
+ ret = event_agent_disable(usess, agt, "*");
+ if (ret != LTTNG_OK && ret != LTTNG_ERR_UST_EVENT_NOT_FOUND) {