From: Jérémie Galarneau Date: Sun, 11 Dec 2016 09:42:51 +0000 (-0500) Subject: Writer fix: don't skip first notification X-Git-Tag: v2.0.0-pre1~613 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=996a07a111a6913458fca1b970120bfa167dc4b7 Writer fix: don't skip first notification Signed-off-by: Jérémie Galarneau --- diff --git a/plugins/writer/writer.c b/plugins/writer/writer.c index ad268ebf..525f0d57 100644 --- a/plugins/writer/writer.c +++ b/plugins/writer/writer.c @@ -193,17 +193,17 @@ enum bt_component_status run(struct bt_component *component) goto end; } - ret = bt_notification_iterator_next(it); - if (ret != BT_COMPONENT_STATUS_OK) { - goto end; - } - notification = bt_notification_iterator_get_notification(it); if (!notification) { ret = BT_COMPONENT_STATUS_ERROR; goto end; } + ret = bt_notification_iterator_next(it); + if (ret != BT_COMPONENT_STATUS_OK) { + goto end; + } + ret = handle_notification(writer_component, notification); end: bt_put(it);