Copy exclusion data in shadow_copy_event
authorJP Ikaheimonen <jp_ikaheimonen@mentor.com>
Tue, 5 Nov 2013 06:10:55 +0000 (08:10 +0200)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 14 Nov 2013 18:40:58 +0000 (13:40 -0500)
src/bin/lttng-sessiond/ust-app.c

index adb31e85baeab6577074d3b77884e760f623eff2..255a41b0d7ca46bd0ec7da805065f33c1d399c35 100644 (file)
@@ -1410,6 +1410,8 @@ error:
 static void shadow_copy_event(struct ust_app_event *ua_event,
                struct ltt_ust_event *uevent)
 {
 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';
 
        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. */
        }
                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);
+               }
+       }
 }
 
 /*
 }
 
 /*
This page took 0.027049 seconds and 4 git commands to generate.