The command was appending a new session name and not replacing it.
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
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;
}