Move to kernel style SPDX license identifiers
[babeltrace.git] / src / lib / graph / iterator.c
index c0ca8f8675f69e90767aba0c5b76590256bf43a1..fad7967a68d092d89bd2cf0f8b8bf3b2f4982db0 100644 (file)
@@ -1,24 +1,8 @@
 /*
+ * SPDX-License-Identifier: MIT
+ *
  * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
  */
 
 #define BT_LOG_TAG "LIB/MSG-ITER"
 #include "lib/trace-ir/clock-class.h"
 #include "lib/trace-ir/clock-snapshot.h"
 #include <babeltrace2/trace-ir/field.h>
-#include <babeltrace2/trace-ir/event-const.h>
+#include <babeltrace2/trace-ir/event.h>
 #include "lib/trace-ir/event.h"
-#include <babeltrace2/trace-ir/packet-const.h>
+#include <babeltrace2/trace-ir/packet.h>
 #include "lib/trace-ir/packet.h"
 #include "lib/trace-ir/stream.h"
-#include <babeltrace2/trace-ir/clock-class-const.h>
-#include <babeltrace2/trace-ir/stream-class-const.h>
-#include <babeltrace2/trace-ir/stream-const.h>
-#include <babeltrace2/graph/connection-const.h>
-#include <babeltrace2/graph/component-const.h>
-#include <babeltrace2/graph/component-sink-const.h>
-#include <babeltrace2/graph/message-const.h>
-#include <babeltrace2/graph/message-iterator.h>
-#include <babeltrace2/graph/message-event-const.h>
-#include <babeltrace2/graph/message-message-iterator-inactivity-const.h>
-#include <babeltrace2/graph/message-packet-beginning.h>
-#include <babeltrace2/graph/message-packet-beginning-const.h>
-#include <babeltrace2/graph/message-packet-end-const.h>
-#include <babeltrace2/graph/message-stream-beginning.h>
-#include <babeltrace2/graph/message-stream-beginning-const.h>
-#include <babeltrace2/graph/message-stream-end-const.h>
-#include <babeltrace2/graph/port-const.h>
+#include <babeltrace2/trace-ir/clock-class.h>
+#include <babeltrace2/trace-ir/stream-class.h>
+#include <babeltrace2/trace-ir/stream.h>
+#include <babeltrace2/graph/connection.h>
+#include <babeltrace2/graph/component.h>
+#include <babeltrace2/graph/message.h>
+#include <babeltrace2/graph/self-component.h>
+#include <babeltrace2/graph/port.h>
 #include <babeltrace2/graph/graph.h>
-#include <babeltrace2/graph/graph-const.h>
+#include <babeltrace2/graph/message-iterator.h>
 #include <babeltrace2/types.h>
 #include "common/assert.h"
 #include "lib/assert-pre.h"
@@ -427,7 +402,6 @@ int create_self_component_input_port_message_iterator(
                iter_status = init_method(
                        (struct bt_self_message_iterator *) iterator,
                        &iterator->config,
-                       (struct bt_self_component *) upstream_comp,
                        (struct bt_self_component_port_output *) upstream_port);
                BT_LOGD("User method returned: status=%s",
                        bt_common_func_status_string(iter_status));
@@ -564,7 +538,7 @@ bool clock_snapshots_are_monotonic_one(
        {
                struct bt_message_message_iterator_inactivity *inactivity_msg =
                        (struct bt_message_message_iterator_inactivity *) msg;
-               clock_snapshot = inactivity_msg->default_cs;
+               clock_snapshot = inactivity_msg->cs;
                break;
        }
        case BT_MESSAGE_TYPE_PACKET_BEGINNING:
@@ -1262,7 +1236,7 @@ int auto_seek_handle_message(
                const struct bt_message_message_iterator_inactivity *inactivity_msg =
                        (const void *) msg;
 
-               clk_snapshot = inactivity_msg->default_cs;
+               clk_snapshot = inactivity_msg->cs;
                BT_ASSERT_DBG(clk_snapshot);
                break;
        }
@@ -1426,7 +1400,7 @@ skip_msg:
                struct auto_seek_stream_state *stream_state;
 
                stream_state = g_hash_table_lookup(stream_states,
-                       event_msg->event->packet->stream);
+                       event_msg->event->stream);
                BT_ASSERT_DBG(stream_state);
 
                // HELPME: are we sure that event messages have clock snapshots at this point?
This page took 0.024466 seconds and 4 git commands to generate.