Fix: consumer data pending for empty streams
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 29 Aug 2013 02:47:20 +0000 (22:47 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 29 Aug 2013 13:47:05 +0000 (09:47 -0400)
commite5d1a9b33aa0920bbd9f6948bd0676156da67c61
tree4a382ecc3d2c9fd194474d0126eff225b72c0a8b
parent9d8ad8e29d1f50e6a33c0e9a644c50b5e90364d2
Fix: consumer data pending for empty streams

We should at least output one packet before a stream can be considered
as readable. So far, for PID buffers, if an application exits at the
wrong timing before a stop waiting for data pending, empty streams could
be visible by a babeltrace executed after data pending incorrectly
returned false.

Fix it by considering a stream for which the consumerd has written 0
bytes to the output as having data pending.

This applies to 2.3-rc and stable-2.2.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/consumer.c
src/common/consumer.h
This page took 0.025257 seconds and 4 git commands to generate.