From mboxrd@z Thu Jan 1 00:00:00 1970 From: jp_ikaheimonen@mentor.com (JP Ikaheimonen) Date: Thu, 7 Nov 2013 12:21:42 +0200 Subject: [lttng-dev] [PATCH lttng-tools 18/28] Copy exclusion data in shadow_copy_event In-Reply-To: <1383819703-6793-1-git-send-email-jp_ikaheimonen@mentor.com> References: <1383819703-6793-1-git-send-email-jp_ikaheimonen@mentor.com> Message-ID: <1383819703-6793-9-git-send-email-jp_ikaheimonen@mentor.com> Signed-off-by: JP Ikaheimonen --- src/bin/lttng-sessiond/ust-app.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index adb31e8..255a41b 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -1410,6 +1410,8 @@ error: static void shadow_copy_event(struct ust_app_event *ua_event, struct ltt_ust_event *uevent) { + size_t exclusion_alloc_size; + strncpy(ua_event->name, uevent->attr.name, sizeof(ua_event->name)); ua_event->name[sizeof(ua_event->name) - 1] = '\0'; @@ -1423,6 +1425,16 @@ static void shadow_copy_event(struct ust_app_event *ua_event, ua_event->filter = alloc_copy_ust_app_filter(uevent->filter); /* Filter might be NULL here in case of ENONEM. */ } + + /* Copy exclusion data */ + if (uevent->exclusion) { + exclusion_alloc_size = sizeof(struct lttng_ust_event_exclusion) + + LTTNG_UST_SYM_NAME_LEN * uevent->exclusion->count; + ua_event->exclusion = zmalloc(exclusion_alloc_size); + if (ua_event->exclusion) { + memcpy(ua_event->exclusion, uevent->exclusion, exclusion_alloc_size); + } + } } /* -- 1.8.1.2