Writer fix: don't skip first notification
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 11 Dec 2016 09:42:51 +0000 (04:42 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 27 May 2017 18:09:08 +0000 (14:09 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
plugins/writer/writer.c

index ad268ebf74aa6fc28c4615fb901ff9004031c89d..525f0d579fc80c9eff5e52ddc59c81991e8ccc2d 100644 (file)
@@ -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);
This page took 0.02633 seconds and 4 git commands to generate.