From: David Goulet Date: Tue, 26 Jul 2011 13:33:42 +0000 (-0400) Subject: Fix set session command X-Git-Tag: v2.0-pre4~10 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=fffd054738fa5f42c2c19a2c5bb163dbd529c6a3;p=lttng-tools.git Fix set session command The command was appending a new session name and not replacing it. Signed-off-by: David Goulet --- diff --git a/lttng/commands/set_session.c b/lttng/commands/set_session.c index df0297f9f..8a76403ad 100644 --- a/lttng/commands/set_session.c +++ b/lttng/commands/set_session.c @@ -59,17 +59,10 @@ static void usage(FILE *ofp) static int set_session(void) { int ret = CMD_SUCCESS; - char *path; - path = config_get_default_path(); - if (path == NULL) { - ret = -1; - goto error; - } - - ret = config_add_session_name(path, opt_session_name); + ret = config_init(opt_session_name); if (ret < 0) { - ERR("Unable to add session name to config"); + ERR("Unable to set session name"); ret = CMD_ERROR; goto error; }