Fix: relayd: handling of lttng_read errors >= 0
A message that is not in the archive (sent off-list or not yet received): [email protected]
Merged in master, stable-2.11, stable-2.10, and stable-2.9.
Thanks!
Jérémie
Quoted 31 lines · Mathieu Desnoyers
errno is only set when
lttng_readreturns a negative value. Else, we need to print aERR()statement rather than usePERROR().Signed-off-by Mathieu Desnoyers <[email protected]>--- src/common/index/index.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)src/common/index/index.c +5
-1@@ -171,10 +171,14 @@ int lttng_index_file_read(const struct lttng_index_file *index_file, } ret =lttng_read (fd, element, len); -if (ret < len) { +if (ret <0 ) {PERROR ("read index file" ); goto error; } +if (ret < len) { +ERR ("lttng_read expected %zu, returned %zd" , len, ret); + goto error; + }return 0 ; error:Signature · 1 line
2.17.1