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 14:50:12 +0000 (10:50 -0400)
commit6d67e4b4a3fb93ef10449e00d42f8344355c2d78
tree64deed478b318c2175496ad88a5c49781fbc9713
parente4c2a64a927412932c14124083ea11d05d714d5c
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.025854 seconds and 4 git commands to generate.