Set registration done Agent command version back to 0
[lttng-tools.git] / src / bin / lttng-sessiond / agent.c
index 7349d09f0e7edd9dbfad5e082e89a0825f440a26..c321ae41f0987c42a308ba3311b381eb4237ceff 100644 (file)
@@ -494,11 +494,14 @@ error:
 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();
 
@@ -516,10 +519,10 @@ int agent_disable_event(struct agent_event *event,
        }
 
        event->enabled = 0;
-       ret = LTTNG_OK;
 
 error:
        rcu_read_unlock();
+end:
        return ret;
 }
 
This page took 0.024334 seconds and 4 git commands to generate.