There is a problem currently when trying to send multiple streams that
don't have a clock class (which is a supported use case) to a muxer
instance.
The first time we enter validate_new_stream_clock_class without a clock
class, we set the expectation to
MUXER_MSG_ITER_CLOCK_CLASS_EXPECTATION_NONE. The second time we enter
without a clock class, we wrongfully go to the error case. We are
missing a check for MUXER_MSG_ITER_CLOCK_CLASS_EXPECTATION_NONE, which
is the expected and valid case. This patch adds it.
Also, the error message is erroneous. If we are in that situation, we
expect a stream class _without_ a clock class, but are met with a stream
class _with_ a clock class. Fix that at the same time.
Change-Id: Iea692578498ea87a33ecba5d2fd54b2980056cd0
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1862
CI-Build: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
/* Expect no clock class */
muxer_msg_iter->clock_class_expectation =
MUXER_MSG_ITER_CLOCK_CLASS_EXPECTATION_NONE;
- } else {
- BT_COMP_LOGE("Expecting stream class with a default clock class: "
+ } else if (muxer_msg_iter->clock_class_expectation !=
+ MUXER_MSG_ITER_CLOCK_CLASS_EXPECTATION_NONE) {
+ BT_COMP_LOGE("Expecting stream class without a default clock class: "
"stream-class-addr=%p, stream-class-name=\"%s\", "
"stream-class-id=%" PRIu64,
stream_class, bt_stream_class_get_name(stream_class),