Fix: Don't report an error if no sessions are found with default options
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 8 May 2014 16:12:28 +0000 (12:12 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 12 May 2014 14:16:00 +0000 (10:16 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/config/config.c

index 8b34d02f1d54500a339f4cb190d58bba1bf6d4b1..df6f6a3f496b3ad3093065fa77df79e8e7632e8e 100644 (file)
@@ -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;
 }
This page took 0.026439 seconds and 4 git commands to generate.