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 20:48:07 +0000 (15:48 -0500)
commit92b7a7f81a94f7616c155aed8a213edd68937a57
tree7cf7e30fea30eee24a621df297dd36188b031b77
parent5b951542a175819b62269e6904641f1a26149c96
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.026718 seconds and 5 git commands to generate.