From 996a07a111a6913458fca1b970120bfa167dc4b7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Sun, 11 Dec 2016 04:42:51 -0500 Subject: [PATCH] Writer fix: don't skip first notification MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- plugins/writer/writer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/writer/writer.c b/plugins/writer/writer.c index ad268ebf7..525f0d579 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); -- 2.34.1