From: Francis Deslauriers Date: Tue, 18 Dec 2018 21:24:25 +0000 (-0500) Subject: Fix: ctf plugin: returning bt_message_iterator_status from src.ctf.fs X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=346ce9d3d125bad003efb3902ec42f8f8a942803;p=deliverable%2Fbabeltrace.git Fix: ctf plugin: returning bt_message_iterator_status from src.ctf.fs A source should only be dealing with `bt_self_message_iterator_status` since it's the one producing the messages. Non-self message iterator status are received from upstream iterators which sources have none by definition. Signed-off-by: Francis Deslauriers --- diff --git a/plugins/ctf/fs-src/data-stream-file.c b/plugins/ctf/fs-src/data-stream-file.c index 280a5d398..45e426bc6 100644 --- a/plugins/ctf/fs-src/data-stream-file.c +++ b/plugins/ctf/fs-src/data-stream-file.c @@ -706,22 +706,22 @@ void ctf_fs_ds_file_destroy(struct ctf_fs_ds_file *ds_file) } BT_HIDDEN -bt_message_iterator_status ctf_fs_ds_file_next( +bt_self_message_iterator_status ctf_fs_ds_file_next( struct ctf_fs_ds_file *ds_file, bt_message **msg) { enum bt_msg_iter_status msg_iter_status; - bt_message_iterator_status status; + bt_self_message_iterator_status status; msg_iter_status = bt_msg_iter_get_next_message( ds_file->msg_iter, ds_file->pc_msg_iter, msg); switch (msg_iter_status) { case BT_MSG_ITER_STATUS_EOF: - status = BT_MESSAGE_ITERATOR_STATUS_END; + status = BT_SELF_MESSAGE_ITERATOR_STATUS_END; break; case BT_MSG_ITER_STATUS_OK: - status = BT_MESSAGE_ITERATOR_STATUS_OK; + status = BT_SELF_MESSAGE_ITERATOR_STATUS_OK; break; case BT_MSG_ITER_STATUS_AGAIN: /* @@ -733,7 +733,7 @@ bt_message_iterator_status ctf_fs_ds_file_next( case BT_MSG_ITER_STATUS_INVAL: case BT_MSG_ITER_STATUS_ERROR: default: - status = BT_MESSAGE_ITERATOR_STATUS_ERROR; + status = BT_SELF_MESSAGE_ITERATOR_STATUS_ERROR; break; } return status; diff --git a/plugins/ctf/fs-src/data-stream-file.h b/plugins/ctf/fs-src/data-stream-file.h index 05c1dc342..61007f817 100644 --- a/plugins/ctf/fs-src/data-stream-file.h +++ b/plugins/ctf/fs-src/data-stream-file.h @@ -136,7 +136,7 @@ BT_HIDDEN void ctf_fs_ds_file_destroy(struct ctf_fs_ds_file *stream); BT_HIDDEN -bt_message_iterator_status ctf_fs_ds_file_next( +bt_self_message_iterator_status ctf_fs_ds_file_next( struct ctf_fs_ds_file *ds_file, bt_message **msg);