Fix: cmd_snapshot_record can return unexpected error codes
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 16 Nov 2018 21:46:36 +0000 (16:46 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 16 Nov 2018 22:23:34 +0000 (17:23 -0500)
commit8f07cd01cc282574714b1e42545d6c401ccfa81c
tree7d89eb83ba77f7c38cfa50582a2f4f1d0c47330a
parentc1cd9f61d342680f41df3b2812a0ecab447d3a21
Fix: cmd_snapshot_record can return unexpected error codes

cmd_snapshot_record() does not correctly handle the various error
reporting conventions used by the functions it uses. In certain cases,
invalid error codes (not part of enum lttng_error_code) can bubble up
to the command handler which results in erroneous error messages being
reported by the client.

This change harmonizes the error handling and changes a number of
functions used to explicitly return 'enum lttng_error_code' instead
of 'int'.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/cmd.c
src/bin/lttng-sessiond/consumer.c
src/bin/lttng-sessiond/consumer.h
src/bin/lttng-sessiond/kernel.c
src/bin/lttng-sessiond/kernel.h
src/bin/lttng-sessiond/ust-app.c
src/bin/lttng-sessiond/ust-app.h
This page took 0.02677 seconds and 4 git commands to generate.