#include <babeltrace2/trace-ir/packet.h>
#include "lib/trace-ir/packet.h"
#include "lib/trace-ir/stream.h"
+#include "lib/trace-ir/stream-class.h"
#include <babeltrace2/trace-ir/clock-class.h>
#include <babeltrace2/trace-ir/stream-class.h>
#include <babeltrace2/trace-ir/stream.h>
#include "component-class.h"
#include "component.h"
-#include "component-sink.h"
-#include "component-source.h"
#include "connection.h"
#include "graph.h"
+#include "iterator.h"
#include "message-iterator-class.h"
#include "message/discarded-items.h"
#include "message/event.h"
-#include "message/iterator.h"
#include "message/message.h"
#include "message/message-iterator-inactivity.h"
#include "message/stream.h"
"%!+i", iterator);
bt_message_iterator_try_finalize(iterator);
+ if (iterator->clock_expectation.type ==
+ CLOCK_EXPECTATION_ORIGIN_OTHER_NO_UUID) {
+ BT_CLOCK_CLASS_PUT_REF_AND_RESET(
+ iterator->clock_expectation.clock_class);
+ }
+
if (iterator->connection) {
/*
* Remove ourself from the originating connection so
bt_uuid_copy(iterator->clock_expectation.uuid, clock_class_uuid);
} else {
iterator->clock_expectation.type = CLOCK_EXPECTATION_ORIGIN_OTHER_NO_UUID;
+ iterator->clock_expectation.clock_class = clock_class;
+ bt_clock_class_get_ref(iterator->clock_expectation.clock_class);
}
break;
case CLOCK_EXPECTATION_ORIGIN_OTHER_NO_UUID:
if (!clock_class) {
BT_ASSERT_COND_DEV_MSG(
- "Expecting a clock class, got none.");
+ "Expecting clock class %![cc-]+K, got none.",
+ iterator->clock_expectation.clock_class);
result = false;
goto end;
}
- if (bt_clock_class_origin_is_unix_epoch(clock_class)) {
+ if (clock_class != iterator->clock_expectation.clock_class) {
BT_ASSERT_COND_DEV_MSG(
- "Expecting a clock class without Unix epoch origin: %![cc-]+K",
+ "Expecting clock class %![cc-]+K, got %![cc-]+K.",
+ iterator->clock_expectation.clock_class,
clock_class);
result = false;
goto end;
}
- if (clock_class_uuid) {
- BT_ASSERT_COND_DEV_MSG(
- "Expecting a clock class without UUID: %![cc-]+K",
- clock_class);
- result = false;
- goto end;
- }
break;
}
}