Fix set session command
authorDavid Goulet <david.goulet@polymtl.ca>
Tue, 26 Jul 2011 13:33:42 +0000 (09:33 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Tue, 26 Jul 2011 13:33:42 +0000 (09:33 -0400)
The command was appending a new session name and not replacing it.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
lttng/commands/set_session.c

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