Fix: cmd_rotate_session() returns unexpected error codes
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 14 Nov 2018 22:30:17 +0000 (17:30 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 16 Nov 2018 20:48:07 +0000 (15:48 -0500)
Certain paths in cmd_rotate_session() result in its return value not
obeying the convention for commands: return LTTNG_OK on success, and a
negative LTTNG_ERR_* code on error.

This patch separates the use of 'int ret' from a separate 'enum
lttng_error_code' value to ensure 'ret' values never bubble-up to the
caller.

Note that this patch assumes that ust_app_rotate_session() returns an
lttng_error_code, which is not the case right now (upcoming patch).

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>

No differences found
This page took 0.027326 seconds and 5 git commands to generate.