From d2b6effff5e88183f4dfc630131ab6d1b783318e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 8 May 2014 12:12:28 -0400 Subject: [PATCH] Fix: Don't report an error if no sessions are found with default options MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau Signed-off-by: David Goulet --- src/common/config/config.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/common/config/config.c b/src/common/config/config.c index 8b34d02f1..df6f6a3f4 100644 --- a/src/common/config/config.c +++ b/src/common/config/config.c @@ -2544,5 +2544,12 @@ int config_load_session(const char *path, const char *session_name, } end: fini_session_config_validation_ctx(&validation_ctx); + if (ret == -LTTNG_ERR_LOAD_SESSION_NOENT && !session_name && !path) { + /* + * Don't report an error if no sessions are found when called + * without a session_name or a search path. + */ + ret = 0; + } return ret; } -- 2.34.1