From 663618eed7aae79f22d8649f677bf13a3bb76771 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 6 Sep 2016 16:13:10 -0400 Subject: [PATCH] add debug printout MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- include/babeltrace/plugin/notification/iterator.h | 2 ++ plugins/ctf/fs/fs.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/babeltrace/plugin/notification/iterator.h b/include/babeltrace/plugin/notification/iterator.h index 55de0ea07..db4164fd9 100644 --- a/include/babeltrace/plugin/notification/iterator.h +++ b/include/babeltrace/plugin/notification/iterator.h @@ -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. */ diff --git a/plugins/ctf/fs/fs.c b/plugins/ctf/fs/fs.c index bcaf4d5ab..2e44c3172 100644 --- a/plugins/ctf/fs/fs.c +++ b/plugins/ctf/fs/fs.c @@ -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(""); 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(""); break; } default: break; } + bt_ctf_notif_iter_notif_destroy(notification); end: - return ret; + return BT_NOTIFICATION_ITERATOR_STATUS_OK; } static -- 2.34.1