Fix: consumer: rotation error return codes
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 14 Nov 2018 21:11:48 +0000 (16:11 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 16 Nov 2018 22:23:34 +0000 (17:23 -0500)
commite96d66b43bb3519ac5e2ea69c837c786f1363480
tree39c937c4e4274a6b8e16adec70e1bc89576acb6d
parent7f560f1da3586910c2863c754324d4a4b8056d1d
Fix: consumer: rotation error return codes

The return codes of rotation commands from consumerd are not
in sync with reality. Some are simply copy-pasted from old code.

Add new return codes to describe each error situation, and split the
"channel lookup" error from other errors so sessiond can distinguish
between an error caused by an exiting application (per-pid buffers)
(LTTCOMM_CONSUMERD_CHAN_NOT_FOUND) and an actual error while performing
the command.

Move the channel lookup into the rotation caller, because it is used by
two sub-functions: we don't want to lookup to succeed for the first and
then fail for the second.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/consumer/consumer.c
src/common/consumer/consumer.h
src/common/kernel-consumer/kernel-consumer.c
src/common/sessiond-comm/sessiond-comm.h
src/common/ust-consumer/ust-consumer.c
This page took 0.025654 seconds and 4 git commands to generate.