X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fnotification.cpp;h=e531e511a26c08897ec29bb3310f4f14a6e591cc;hb=a9cfc0f36bf8ade64df08392b03a9f15409dc01b;hp=989c20ade5e1f126ffcf2609e7f0eea21e2f4028;hpb=a6bc4ca9d659caf016ef932fcd944029737ac57c;p=lttng-tools.git diff --git a/src/common/notification.cpp b/src/common/notification.cpp index 989c20ade..e531e511a 100644 --- a/src/common/notification.cpp +++ b/src/common/notification.cpp @@ -5,14 +5,14 @@ * */ -#include -#include -#include +#include +#include +#include #include #include -#include -#include -#include +#include +#include +#include struct lttng_notification *lttng_notification_create( struct lttng_trigger *trigger, @@ -24,7 +24,7 @@ struct lttng_notification *lttng_notification_create( goto end; } - notification = (lttng_notification *) zmalloc(sizeof(struct lttng_notification)); + notification = zmalloc(); if (!notification) { goto end; } @@ -175,6 +175,24 @@ const struct lttng_evaluation *lttng_notification_get_evaluation( return notification ? notification->evaluation : NULL; } +const struct lttng_condition *lttng_notification_get_const_condition( + const struct lttng_notification *notification) +{ + return notification ? lttng_trigger_get_const_condition(notification->trigger) : NULL; +} + +const struct lttng_evaluation *lttng_notification_get_const_evaluation( + const struct lttng_notification *notification) +{ + return notification ? notification->evaluation : NULL; +} + +const struct lttng_trigger *lttng_notification_get_const_trigger( + const struct lttng_notification *notification) +{ + return notification ? notification->trigger : NULL; +} + const struct lttng_trigger *lttng_notification_get_trigger( struct lttng_notification *notification) {