X-Git-Url: https://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Fplugins%2Futils%2Fmuxer%2Fmsg-iter.cpp;fp=src%2Fplugins%2Futils%2Fmuxer%2Fmsg-iter.cpp;h=63b08c2dd2e7d3eb630169bb6c701906d9c727cd;hp=2121a0f222595687d4164226311163af024c3acd;hb=0f63520992da61c0bd6945760e86bc62904d2224;hpb=dc0f6dd12e26b428fdc74f159d66182dd4b0b1e3 diff --git a/src/plugins/utils/muxer/msg-iter.cpp b/src/plugins/utils/muxer/msg-iter.cpp index 2121a0f2..63b08c2d 100644 --- a/src/plugins/utils/muxer/msg-iter.cpp +++ b/src/plugins/utils/muxer/msg-iter.cpp @@ -280,6 +280,7 @@ void MsgIter::_setClkClsExpectation( * without a UUID. */ _mClkClsExpectation = _ClkClsExpectation::ORIG_ISNT_UNIX_EPOCH_AND_NO_UUID; + _mExpectedClkCls = clkCls->shared(); } } } @@ -324,27 +325,22 @@ void MsgIter::_makeSureClkClsIsExpected( break; case _ClkClsExpectation::ORIG_ISNT_UNIX_EPOCH_AND_NO_UUID: BT_ASSERT_DBG(!_mExpectedClkClsUuid); + BT_ASSERT_DBG(_mExpectedClkCls); - if (clkCls->originIsUnixEpoch()) { + if (clkCls->libObjPtr() != _mExpectedClkCls->libObjPtr()) { BT_CPPLOGE_APPEND_CAUSE_AND_THROW( bt2::Error, - "Expecting a clock class not having a Unix epoch origin, " - "but got one having a Unix epoch origin: " - "clock-class-addr={}, clock-class-name={}", + "Unexpected clock class: " + "expected-clock-class-addr={}, expected-clock-class-name={}, " + "actual-clock-class-addr={}, actual-clock-class-name={}", + fmt::ptr(_mExpectedClkCls->libObjPtr()), optLogStr(_mExpectedClkCls->name()), clkClsAddr, optLogStr(clkCls->name())); } - if (clkCls->uuid()) { - BT_CPPLOGE_APPEND_CAUSE_AND_THROW( - bt2::Error, - "Expecting a clock class without a UUID, but got one with a UUID: " - "clock-class-addr={}, clock-class-name={}, uuid={}", - clkClsAddr, optLogStr(clkCls->name()), clkCls->uuid()->str()); - } - break; case _ClkClsExpectation::ORIG_ISNT_UNIX_EPOCH_AND_SPEC_UUID: BT_ASSERT_DBG(_mExpectedClkClsUuid); + BT_ASSERT_DBG(!_mExpectedClkCls); if (clkCls->originIsUnixEpoch()) { BT_CPPLOGE_APPEND_CAUSE_AND_THROW(