Fix: ctf plugin: returning bt_message_iterator_status from src.ctf.fs
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Tue, 18 Dec 2018 21:24:25 +0000 (16:24 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 3 May 2019 22:19:37 +0000 (18:19 -0400)
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 <francis.deslauriers@efficios.com>
plugins/ctf/fs-src/data-stream-file.c
plugins/ctf/fs-src/data-stream-file.h

index 280a5d398ceb5f7b480d9fb4bcde4cc48f7e2722..45e426bc64ab5b4682f1155d6714bbc327debdf4 100644 (file)
@@ -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;
index 05c1dc342c6f2b5a22b7e0e25e8c95ebade69501..61007f817e4e78f48d464a1e7e9b9d13a32437b3 100644 (file)
@@ -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);
 
This page took 0.026213 seconds and 4 git commands to generate.