Fix: ustctl_get_stream_id without UST support
authorDavid Goulet <dgoulet@efficios.com>
Mon, 14 Jul 2014 19:49:02 +0000 (15:49 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 14 Jul 2014 19:49:02 +0000 (15:49 -0400)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/consumer-timer.c
src/common/ust-consumer/ust-consumer.c
src/common/ust-consumer/ust-consumer.h

index d36e2bccfdd08cb304d2d362403325db85c4c3af..1408052431aac3613db4e912c505320dd497e1ba 100644 (file)
@@ -27,7 +27,6 @@
 #include <common/kernel-ctl/kernel-ctl.h>
 #include <common/kernel-consumer/kernel-consumer.h>
 #include <common/consumer-stream.h>
-#include <lttng/ust-ctl.h>
 
 #include "consumer-timer.h"
 #include "consumer-testpoint.h"
@@ -214,7 +213,7 @@ static int check_ust_stream(struct lttng_consumer_stream *stream)
                        ret = -1;
                        goto error_unlock;
                }
-               ret = ustctl_get_stream_id(stream->ustream, &stream_id);
+               ret = lttng_ustconsumer_get_stream_id(stream, &stream_id);
                if (ret < 0) {
                        PERROR("ustctl_get_stream_id");
                        goto error_unlock;
index 4435bf3fd4e22cae6cd74113981e25b42d07c756..01f79d68fe6e4c50feb4a6983ef8b51fd4aed21a 100644 (file)
@@ -2383,3 +2383,15 @@ end:
        pthread_mutex_unlock(&ctx->metadata_socket_lock);
        return ret;
 }
+
+/*
+ * Return the ustctl call for the get stream id.
+ */
+int lttng_ustconsumer_get_stream_id(struct lttng_consumer_stream *stream,
+               uint64_t *stream_id)
+{
+       assert(stream);
+       assert(stream_id);
+
+       return ustctl_get_stream_id(stream->ustream, stream_id);
+}
index ac29857b35cf7c681dbb10a22a6facd9ff7cc76f..4357380a60965855d36fe199d9cf7c68eb446e5b 100644 (file)
@@ -50,6 +50,8 @@ void lttng_ustconsumer_on_stream_hangup(struct lttng_consumer_stream *stream);
 int lttng_ustctl_get_mmap_read_offset(struct lttng_consumer_stream *stream,
                unsigned long *off);
 void *lttng_ustctl_get_mmap_base(struct lttng_consumer_stream *stream);
+int lttng_ustconsumer_get_stream_id(struct lttng_consumer_stream *stream,
+               uint64_t *stream_id);
 int lttng_ustconsumer_data_pending(struct lttng_consumer_stream *stream);
 void lttng_ustconsumer_close_all_metadata(struct lttng_ht *ht);
 void lttng_ustconsumer_close_metadata(struct lttng_consumer_channel *metadata);
@@ -204,6 +206,12 @@ int lttng_ustconsumer_get_current_timestamp(
 {
        return -ENOSYS;
 }
+static inline
+int lttng_ustconsumer_get_stream_id(struct lttng_consumer_stream *stream,
+               uint64_t *stream_id)
+{
+       return -ENOSYS;
+}
 #endif /* HAVE_LIBLTTNG_UST_CTL */
 
 #endif /* _LTTNG_USTCONSUMER_H */
This page took 0.028463 seconds and 4 git commands to generate.