X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=liblttng-ust%2Flttng-events.c;h=7aa288c75210d1da75d84cfef08f82cdbcc292bf;hb=f596de62e69d1942ec545b8ba6b8f8b7244f8fb4;hp=e130ec626d35f3f6d140737d51151245acbc51a6;hpb=b33b46f7161604cb9168e9bbc854413cf18269be;p=lttng-ust.git diff --git a/liblttng-ust/lttng-events.c b/liblttng-ust/lttng-events.c index e130ec62..7aa288c7 100644 --- a/liblttng-ust/lttng-events.c +++ b/liblttng-ust/lttng-events.c @@ -415,6 +415,9 @@ int lttng_session_enable(struct lttng_session *session) /* Set transient enabler state to "enabled" */ session->tstate = 1; + /* We need to sync enablers with session before activation. */ + lttng_session_sync_enablers(session); + /* * Snapshot the number of events per channel to know the type of header * we need to use. @@ -458,9 +461,6 @@ int lttng_session_enable(struct lttng_session *session) } } - /* We need to sync enablers with session before activation. */ - lttng_session_sync_enablers(session); - /* Set atomically the state to "active" */ CMM_ACCESS_ONCE(session->active) = 1; CMM_ACCESS_ONCE(session->been_active) = 1; @@ -798,7 +798,7 @@ void lttng_probe_provider_unregister_events(struct lttng_probe_desc *provider_de struct lttng_session *session; struct cds_hlist_head *head; struct lttng_event *event; - int i; + unsigned int i, j; /* Get handle on list of sessions. */ sessionsp = _lttng_get_sessions();