Backported to glibc 2.8
[lttng-tools.git] / src / common / kernel-consumer / kernel-consumer.c
index ab4f604d7a5c525447cdf23453633ef0baa4318a..57dc2ba6a76767d623c62fc552cb413fd0a0e71f 100644 (file)
@@ -35,6 +35,7 @@
 #include <common/sessiond-comm/sessiond-comm.h>
 #include <common/sessiond-comm/relayd.h>
 #include <common/compat/fcntl.h>
+#include <common/compat/endian.h>
 #include <common/pipe.h>
 #include <common/relayd/relayd.h>
 #include <common/utils.h>
@@ -918,6 +919,11 @@ int lttng_kconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
 
                health_code_update();
 
+               /* Stop right now if no channel was found. */
+               if (!channel) {
+                       goto end_nosignal;
+               }
+
                /*
                 * This command should ONLY be issued for channel with streams set in
                 * no monitor mode.
This page took 0.023588 seconds and 4 git commands to generate.