X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=doc%2Fexamples%2Ftrigger-condition-event-matches%2Fnotification-client.cpp;fp=doc%2Fexamples%2Ftrigger-condition-event-matches%2Fnotification-client.cpp;h=bce5d815d991590bde3a54ce60f0fde228894f29;hb=bdfd0a8e966634bb14999ff7d3729a08881485e8;hp=d1d5d8721471d9809cb38c75e7eae37ed72e0e61;hpb=2a6ebf6bdc5c9b8855def9b0fa3fda6d66c83946;p=lttng-tools.git diff --git a/doc/examples/trigger-condition-event-matches/notification-client.cpp b/doc/examples/trigger-condition-event-matches/notification-client.cpp index d1d5d8721..bce5d815d 100644 --- a/doc/examples/trigger-condition-event-matches/notification-client.cpp +++ b/doc/examples/trigger-condition-event-matches/notification-client.cpp @@ -514,6 +514,11 @@ int main(int argc, char **argv) ret = 0; goto end; case LTTNG_NOTIFICATION_CHANNEL_STATUS_OK: + ret = print_notification(notification); + lttng_notification_destroy(notification); + if (ret) { + goto end; + } break; case LTTNG_NOTIFICATION_CHANNEL_STATUS_CLOSED: printf("Notification channel was closed by peer.\n"); @@ -523,12 +528,6 @@ int main(int argc, char **argv) ret = -1; goto end; } - - ret = print_notification(notification); - lttng_notification_destroy(notification); - if (ret) { - goto end; - } } end: lttng_triggers_destroy(triggers);