Fix: Off by one in seq num for data pending command
authorDavid Goulet <dgoulet@efficios.com>
Wed, 19 Dec 2012 20:36:59 +0000 (15:36 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Wed, 19 Dec 2012 20:50:37 +0000 (15:50 -0500)
commit39df6d9f42d8644d9ee25c8c02517b2cef6f5941
treef44996885f0bce448aabff44c85e0eeb59f80dea
parentf9dfc3d95caf3a7d927d58f252006390e168a1c2
Fix: Off by one in seq num for data pending command

Like the close stream command, the next sequence number of the stream
needs to be used minus 1 for the data pending or else we are off by one
on the relayd during the check since 4 data packets for instance means a
prev_seq value of 4 but a last_next_seq_num of 5 hence creating an off
by one for the data pending check.

Furthermore, the check was actually wrong on the relayd side. Having a
previous sequence number lower than the last one seen does NOT mean that
the data is not pending so the check needed was actually equal or
greater.

Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-relayd/main.c
src/common/consumer.c
This page took 0.025643 seconds and 4 git commands to generate.