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 21:51:18 +0000 (17:51 -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.027065 seconds and 5 git commands to generate.