Fix: chunk state is not set when relayd does not support trace chunks
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Wed, 4 Sep 2019 22:29:58 +0000 (18:29 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 5 Sep 2019 23:39:24 +0000 (19:39 -0400)
Being explicit here enforces that for a lttng-relayd that does not
support chunks, the queried chunk will never exist.

This caused a lttng destroy command to hang during backward
compatibility testing with older lttng-relayd.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/relayd/relayd.c

index 49997015e3f9cb73f7fa63fa99c703dbb67a095b..a9c2bb2c36d65829d741ce5b864ed8e7549ff2ed 100644 (file)
@@ -1480,6 +1480,8 @@ int relayd_trace_chunk_exists(struct lttcomm_relayd_sock *sock,
 
        if (!relayd_supports_chunks(sock)) {
                DBG("Refusing to check for trace chunk existence: relayd does not support chunks");
+               /* The chunk will never exist */
+               *chunk_exists = false;
                goto end;
        }
 
This page took 0.026093 seconds and 4 git commands to generate.