goto error;
}
- if (lttng_strncpy(obj->subdir, tmp_path, sizeof(obj->subdir))) {
+ if (lttng_strncpy(obj->dst.net.base_dir, tmp_path,
+ sizeof(obj->dst.net.base_dir))) {
ret = -LTTNG_ERR_INVALID;
goto error;
}
- DBG3("Consumer set network uri subdir path %s", tmp_path);
+ DBG3("Consumer set network uri base_dir path %s", tmp_path);
}
return 0;
msg.u.snapshot_channel.use_relayd = 1;
ret = snprintf(msg.u.snapshot_channel.pathname,
sizeof(msg.u.snapshot_channel.pathname),
- "%s/%s-%s-%" PRIu64 "%s", output->consumer->subdir,
- output->name, output->datetime, output->nb_snapshot,
+ "%s/%s/%s-%s-%" PRIu64 "%s",
+ output->consumer->dst.net.base_dir,
+ output->consumer->subdir,
+ output->name, output->datetime,
+ output->nb_snapshot,
session_path);
if (ret < 0) {
ret = -LTTNG_ERR_NOMEM;
} else {
ret = snprintf(msg.u.snapshot_channel.pathname,
sizeof(msg.u.snapshot_channel.pathname),
- "%s/%s-%s-%" PRIu64 "%s", output->consumer->dst.session_root_path,
- output->name, output->datetime, output->nb_snapshot,
+ "%s/%s-%s-%" PRIu64 "%s",
+ output->consumer->dst.session_root_path,
+ output->name, output->datetime,
+ output->nb_snapshot,
session_path);
if (ret < 0) {
ret = -LTTNG_ERR_NOMEM;
}
DBG3("Kernel local consumer tracefile path: %s", pathname);
} else {
- ret = snprintf(tmp_path, sizeof(tmp_path), "%s", consumer->subdir);
+ ret = snprintf(tmp_path, sizeof(tmp_path), "%s%s",
+ consumer->dst.net.base_dir,
+ consumer->subdir);
if (ret < 0) {
PERROR("snprintf kernel metadata path");
goto error;
}
}
} else {
- ret = snprintf(pathname, PATH_MAX, "%s%s", consumer->subdir,
+ ret = snprintf(pathname, PATH_MAX, "%s%s%s%s",
+ consumer->dst.net.base_dir,
+ consumer->chunk_path,
+ consumer->subdir,
ua_sess->path);
if (ret < 0) {
PERROR("snprintf channel path");