projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: Off by one in seq num for data pending command
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
main.c
diff --git
a/src/bin/lttng-relayd/main.c
b/src/bin/lttng-relayd/main.c
index a3eef148810e3219d1978edeacfe1e2434d46690..d0cf15a30febfa0602a4b377387fbe947e521a2d 100644
(file)
--- a/
src/bin/lttng-relayd/main.c
+++ b/
src/bin/lttng-relayd/main.c
@@
-1427,7
+1427,7
@@
int relay_data_pending(struct lttcomm_relayd_hdr *recv_hdr,
last_net_seq_num);
/* Avoid wrapping issue */
last_net_seq_num);
/* Avoid wrapping issue */
- if (((int64_t) (stream->prev_seq - last_net_seq_num))
<
= 0) {
+ if (((int64_t) (stream->prev_seq - last_net_seq_num))
>
= 0) {
/* Data has in fact been written and is NOT pending */
ret = 0;
} else {
/* Data has in fact been written and is NOT pending */
ret = 0;
} else {
@@
-1818,7
+1818,9
@@
int relay_add_connection(int fd, struct lttng_poll_event *events,
PERROR("Relay command zmalloc");
goto error;
}
PERROR("Relay command zmalloc");
goto error;
}
- ret = read(fd, relay_connection, sizeof(struct relay_command));
+ do {
+ ret = read(fd, relay_connection, sizeof(struct relay_command));
+ } while (ret < 0 && errno == EINTR);
if (ret < 0 || ret < sizeof(struct relay_command)) {
PERROR("read relay cmd pipe");
goto error_read;
if (ret < 0 || ret < sizeof(struct relay_command)) {
PERROR("read relay cmd pipe");
goto error_read;
This page took
0.039808 seconds
and
4
git commands to generate.