add debug printout
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 6 Sep 2016 20:13:10 +0000 (16:13 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 27 May 2017 18:09:06 +0000 (14:09 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
include/babeltrace/plugin/notification/iterator.h
plugins/ctf/fs/fs.c

index 55de0ea07f30eed1ff4202a7dc6b972cd4083086..db4164fd9ee1a7360397d889452d6d520b57d1d0 100644 (file)
@@ -40,6 +40,8 @@ struct bt_notification_iterator;
  * Status code. Errors are always negative.
  */
 enum bt_notification_iterator_status {
+       /** No more notifications to be delivered. */
+       BT_NOTIFICATION_ITERATOR_STATUS_END = 1,
        /** No error, okay. */
        BT_NOTIFICATION_ITERATOR_STATUS_OK = 0,
        /** Invalid arguments. */
index bcaf4d5ab6df61d02774045b9ae76cd624705e6f..2e44c31723c3eddd6da0274f28a78257bc2b2375 100644 (file)
@@ -89,26 +89,30 @@ enum bt_notification_iterator_status ctf_fs_iterator_next(
        {
                struct bt_ctf_notif_iter_notif_new_packet *notif =
                        (struct bt_ctf_notif_iter_notif_new_packet *) notification;
+               puts("<packet>");
                break;
        }
        case BT_CTF_NOTIF_ITER_NOTIF_EVENT:
        {
                struct bt_ctf_notif_iter_notif_event *notif =
                        (struct bt_ctf_notif_iter_notif_event *) notification;
+               puts("\tevent");
                break;
        }
        case BT_CTF_NOTIF_ITER_NOTIF_END_OF_PACKET:
        {
                struct bt_ctf_notif_iter_notif_end_of_packet *notif =
                        (struct bt_ctf_notif_iter_notif_end_of_packet *) notification;
+               puts("</packet>");
                break;
        }
        default:
                break;
        }
 
+       bt_ctf_notif_iter_notif_destroy(notification);
 end:
-       return ret;
+       return BT_NOTIFICATION_ITERATOR_STATUS_OK;
 }
 
 static
This page took 0.025577 seconds and 4 git commands to generate.