goto error;
}
assert(ret_len == sizeof(lsession));
+ lsession.hostname[LTTNG_VIEWER_HOST_NAME_MAX - 1] = '\0';
+ lsession.session_name[LTTNG_VIEWER_NAME_MAX - 1] = '\0';
fprintf(stdout, "%s/%" PRIu64 " : %s on host %s (timer = %u, "
"%u stream(s), %u client(s) connected)\n",
goto error;
}
assert(ret_len == sizeof(stream));
+ stream.path_name[LTTNG_VIEWER_PATH_MAX - 1] = '\0';
+ stream.channel_name[LTTNG_VIEWER_NAME_MAX - 1] = '\0';
printf_verbose(" stream %" PRIu64 " : %s/%s\n",
be64toh(stream.id), stream.path_name,
path = strdup(LTTNG_METADATA_PATH_TEMPLATE);
path = mkdtemp(path);
ctx->session->streams[i].metadata_flag = 1;
- mkdir(path, S_IRWXU | S_IRWXG);
snprintf(ctx->session->streams[i].path,
sizeof(ctx->session->streams[i].path),
"%s/%s", path,
O_WRONLY | O_CREAT | O_TRUNC,
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
if (ret < 0) {
+ perror("open");
goto error;
}
ctx->session->streams[i].fd = ret;