The notification should only be printed for
`LTTNG_NOTIFICATION_CHANNEL_STATUS_OK`.
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I5534406d8fbd5c0fff7013fda6335d54bef071a2
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");
ret = -1;
goto end;
}
-
- ret = print_notification(notification);
- lttng_notification_destroy(notification);
- if (ret) {
- goto end;
- }
}
end:
lttng_triggers_destroy(triggers);