projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
relayd: remove unnecessary allocation in session path formatting
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
live.c
diff --git
a/src/bin/lttng-relayd/live.c
b/src/bin/lttng-relayd/live.c
index bc0e4529a000a363a377a8de5cbd7cdbf48ddb82..9503ba470b70cd496291ec612f304c45446661d5 100644
(file)
--- a/
src/bin/lttng-relayd/live.c
+++ b/
src/bin/lttng-relayd/live.c
@@
-358,7
+358,7
@@
int make_viewer_streams(struct relay_session *session,
}
} else {
if (!stream->closed ||
}
} else {
if (!stream->closed ||
- !(((int64_t) (stream->prev_seq - stream->last_net_seq_num)) >= 0)) {
+ !(((int64_t) (stream->prev_
data_
seq - stream->last_net_seq_num)) >= 0)) {
(*nb_total)++;
}
(*nb_total)++;
}
@@
-543,11
+543,6
@@
restart:
revents = LTTNG_POLL_GETEV(&events, i);
pollfd = LTTNG_POLL_GETFD(&events, i);
revents = LTTNG_POLL_GETEV(&events, i);
pollfd = LTTNG_POLL_GETFD(&events, i);
- if (!revents) {
- /* No activity for this FD (poll implementation). */
- continue;
- }
-
/* Thread quit pipe has been closed. Killing thread. */
ret = check_thread_quit_pipe(pollfd, revents);
if (ret) {
/* Thread quit pipe has been closed. Killing thread. */
ret = check_thread_quit_pipe(pollfd, revents);
if (ret) {
@@
-835,6
+830,11
@@
int viewer_list_sessions(struct relay_connection *conn)
health_code_update();
health_code_update();
+ if (session->connection_closed) {
+ /* Skip closed session */
+ continue;
+ }
+
if (count >= buf_count) {
struct lttng_viewer_session *newbuf;
uint32_t new_buf_count = buf_count << 1;
if (count >= buf_count) {
struct lttng_viewer_session *newbuf;
uint32_t new_buf_count = buf_count << 1;
@@
-1995,11
+1995,6
@@
restart:
health_code_update();
health_code_update();
- if (!revents) {
- /* No activity for this FD (poll implementation). */
- continue;
- }
-
/* Thread quit pipe has been closed. Killing thread. */
ret = check_thread_quit_pipe(pollfd, revents);
if (ret) {
/* Thread quit pipe has been closed. Killing thread. */
ret = check_thread_quit_pipe(pollfd, revents);
if (ret) {
This page took
0.024591 seconds
and
4
git commands to generate.