Assert that index_file does not exist before setting a new one
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 16 Dec 2016 08:10:00 +0000 (03:10 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 16 Dec 2016 09:47:43 +0000 (04:47 -0500)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/kernel-consumer/kernel-consumer.c
src/common/ust-consumer/ust-consumer.c

index d03ff701533fdab938082a1d551efdeff4140428..bb5ba3b1334ec9883c8d0def28d85d81fb0cbcd5 100644 (file)
@@ -1485,6 +1485,7 @@ int lttng_kconsumer_on_recv_stream(struct lttng_consumer_stream *stream)
                        if (!index_file) {
                                goto error;
                        }
+                       assert(!stream->index_file);
                        stream->index_file = index_file;
                }
        }
index 82d56ebb796910b28b86f417f7ec0f64a08de42b..5c7b00317dabb824f378858bb05234347eec424e 100644 (file)
@@ -2630,6 +2630,7 @@ int lttng_ustconsumer_on_recv_stream(struct lttng_consumer_stream *stream)
                        if (!index_file) {
                                goto error;
                        }
+                       assert(!stream->index_file);
                        stream->index_file = index_file;
                }
        }
This page took 0.032704 seconds and 4 git commands to generate.