Fix: error when listing sessions with no session
authorGeneviève Bastien <gbastien@versatic.net>
Mon, 17 Jun 2019 16:56:21 +0000 (12:56 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 18 Jun 2019 18:21:10 +0000 (14:21 -0400)
commit27ea4ba82550e95043d20b694a16e6bbb5ed9fdb
treec87bcd7dc1f8cf9ec6d758d9c4c08f5973a26bb3
parentc8518459078ae66f40edda7f808f4cf7b4204198
Fix: error when listing sessions with no session

lttng_list_sessions() returns a "fatal error" code when
lttng_ctl_ask_sessiond() returns 0. This was interpreted as the
control socket being shutdown unexpectedly. However, it is
(more often) caused by no sessions being available. Given that, it
makes more sense to report that no sessions are available.

More clean-up/refactoring would be needed to report unexpected socket
shutdowns.

Fixes #1188

Signed-off-by: Geneviève Bastien <gbastien@versatic.net>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/lib/lttng-ctl/lttng-ctl.c
This page took 0.025636 seconds and 4 git commands to generate.