#include <babeltrace/context-internal.h>
#include <babeltrace/ctf-ir/metadata.h>
#include <babeltrace/iterator-internal.h>
+#include <babeltrace/ctf/events.h>
#include <inttypes.h>
static
*/
int bt_iter_add_callback(struct bt_iter *iter,
bt_intern_str event, void *private_data, int flags,
- enum bt_cb_ret (*callback)(struct bt_ctf_data *ctf_data,
+ enum bt_cb_ret (*callback)(struct bt_ctf_event *ctf_data,
void *private_data),
struct bt_dependencies *depends,
struct bt_dependencies *weak_depends,
struct bt_callback *cb;
int i;
enum bt_cb_ret ret;
- struct bt_ctf_data ctf_data;
+ struct bt_ctf_event ctf_data;
ctf_data.event = extract_ctf_stream_event(stream);
ctf_data.stream = stream;
if (!bt_stream_cb || !bt_stream_cb->per_id_callbacks)
goto end;
- if (stream->event_id > bt_stream_cb->per_id_callbacks->len)
+ if (stream->event_id >= bt_stream_cb->per_id_callbacks->len)
goto end;
bt_chain = &g_array_index(bt_stream_cb->per_id_callbacks,
struct bt_callback_chain, stream->event_id);