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:51:27 +0000 (15:51 -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 c1a7fec251e78d2134255f853ea379bcd1a9087c..65c9fd3c285bb9803b3110663b0dd107c9ef0d04 100644 (file)
@@ -26,7 +26,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"
@@ -213,7 +212,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 f45b19944ebf12485fded8ddd1e1ed9038b4e10f..93f8f50a91a60a3c05ce90852d59221244584a03 100644 (file)
@@ -2382,3 +2382,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.02803 seconds and 4 git commands to generate.