X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fcmd.cpp;h=c9924b326190dd4e765ff81af7175bf00a0b1410;hb=69e98ad60c01ddfbfa6eb843960f77804173dd0f;hp=79cb6fed89398e00833f2ea27620090eba09e81e;hpb=5b9eda8a30a21a1c9de4572dd2b397c7cf923fa1;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/cmd.cpp b/src/bin/lttng-sessiond/cmd.cpp index 79cb6fed8..c9924b326 100644 --- a/src/bin/lttng-sessiond/cmd.cpp +++ b/src/bin/lttng-sessiond/cmd.cpp @@ -484,14 +484,22 @@ static enum lttng_error_code list_lttng_ust_global_events(char *channel_name, tmp_event->exclusion = 1; } + std::vector exclusion_names; + if (uevent->exclusion) { + for (int i = 0; i < uevent->exclusion->count; i++) { + exclusion_names.emplace_back( + LTTNG_EVENT_EXCLUSION_NAME_AT(uevent->exclusion, i)); + } + } + /* * We do not care about the filter bytecode and the fd from the * userspace_probe_location. */ ret = lttng_event_serialize(tmp_event, - uevent->exclusion ? uevent->exclusion->count : 0, - uevent->exclusion ? (char **) uevent->exclusion->names : - nullptr, + exclusion_names.size(), + exclusion_names.size() ? exclusion_names.data() : + nullptr, uevent->filter_expression, 0, nullptr,