[lttng-dev] [PATCH lttng-tools] Fix: Pass session name to config_load_session when no path is provided

Jérémie Galarneau jeremie.galarneau at efficios.com
Wed Mar 19 11:28:52 EDT 2014


Fixes #756

Signed-off-by: Jérémie Galarneau <jeremie.galarneau at efficios.com>
---
 src/common/config/config.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/common/config/config.c b/src/common/config/config.c
index 13af2f1..7c6c49b 100644
--- a/src/common/config/config.c
+++ b/src/common/config/config.c
@@ -2456,7 +2456,7 @@ int config_load_session(const char *path, const char *session_name,
 				goto end;
 			}
 
-			ret = load_session_from_path(path, NULL,
+			ret = load_session_from_path(path, session_name,
 				&validation_ctx, 0);
 			if (ret && ret != -LTTNG_ERR_LOAD_SESSION_NOENT) {
 				free(path);
@@ -2467,8 +2467,8 @@ int config_load_session(const char *path, const char *session_name,
 		}
 
 		/* Try system session configuration path */
-		ret = load_session_from_path(DEFAULT_SESSION_SYSTEM_CONFIGPATH, NULL,
-				&validation_ctx, 0);
+		ret = load_session_from_path(DEFAULT_SESSION_SYSTEM_CONFIGPATH,
+			session_name, &validation_ctx, 0);
 		if (ret && ret != -LTTNG_ERR_LOAD_SESSION_NOENT) {
 			goto end;
 		}
-- 
1.9.0




More information about the lttng-dev mailing list