Fix: muxer: check for MUXER_MSG_ITER_CLOCK_CLASS_EXPECTATION_NONE in validate_new_str...
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 9 Aug 2019 20:30:09 +0000 (16:30 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 4 Sep 2019 15:58:20 +0000 (11:58 -0400)
commit150a034fc60eb9cd3feb8b721136c15ed6eb8c70
tree6b610a6585df2c7486f658401db604ef0c563ccb
parentf70d0a9b5e623351495cce77ab10840cac4f9c1a
Fix: muxer: check for MUXER_MSG_ITER_CLOCK_CLASS_EXPECTATION_NONE in validate_new_stream_clock_class

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>
src/plugins/utils/muxer/muxer.c
This page took 0.0242019999999999 seconds and 4 git commands to generate.