projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Propagate error from packet_seek in case of truncated packet
[babeltrace.git]
/
formats
/
lttng-live
/
lttng-live-comm.c
diff --git
a/formats/lttng-live/lttng-live-comm.c
b/formats/lttng-live/lttng-live-comm.c
index cb871a1318113e4909ba3db8ad3ceae132ed7e05..055b1c30e5b321981d3e1fa3072429d545cae8b6 100644
(file)
--- a/
formats/lttng-live/lttng-live-comm.c
+++ b/
formats/lttng-live/lttng-live-comm.c
@@
-1223,7
+1223,7
@@
void ctf_live_packet_seek(struct bt_stream_pos *stream_pos, size_t index,
ret = handle_seek_position(index, whence, viewer_stream, pos,
file_stream);
if (ret != 0) {
ret = handle_seek_position(index, whence, viewer_stream, pos,
file_stream);
if (ret != 0) {
- ret = -
1
;
+ ret = -
BT_PACKET_SEEK_ERROR
;
goto end;
}
goto end;
}
@@
-1266,7
+1266,7
@@
retry:
if (!lttng_live_should_quit()) {
fprintf(stderr, "[error] get_next_index failed\n");
}
if (!lttng_live_should_quit()) {
fprintf(stderr, "[error] get_next_index failed\n");
}
- ret = -
1
;
+ ret = -
BT_PACKET_SEEK_ERROR
;
goto end;
}
printf_verbose("Index received : packet_size : %" PRIu64
goto end;
}
printf_verbose("Index received : packet_size : %" PRIu64
@@
-1389,7
+1389,7
@@
retry:
pos->offset = EOF;
if (!lttng_live_should_quit()) {
fprintf(stderr, "[error] get_data_packet failed\n");
pos->offset = EOF;
if (!lttng_live_should_quit()) {
fprintf(stderr, "[error] get_data_packet failed\n");
- ret = -
1
;
+ ret = -
BT_PACKET_SEEK_ERROR
;
} else {
ret = 0;
}
} else {
ret = 0;
}
This page took
0.023757 seconds
and
4
git commands to generate.