projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: relayd vs consumerd compatibility
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
stream.c
diff --git
a/src/bin/lttng-relayd/stream.c
b/src/bin/lttng-relayd/stream.c
index 8825d094ce57b389662667bfd5d567ca0ed77cfd..c59bb9416b1c9609ca34884cbc6126daf1295b78 100644
(file)
--- a/
src/bin/lttng-relayd/stream.c
+++ b/
src/bin/lttng-relayd/stream.c
@@
-17,7
+17,6
@@
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#define _GNU_SOURCE
#define _LGPL_SOURCE
#include <common/common.h>
#include <common/utils.h>
#define _LGPL_SOURCE
#include <common/common.h>
#include <common/utils.h>
@@
-149,7
+148,7
@@
struct relay_stream *stream_create(struct ctf_trace *trace,
DBG("Tracefile %s/%s created", stream->path_name, stream->channel_name);
}
DBG("Tracefile %s/%s created", stream->path_name, stream->channel_name);
}
- if (!strncmp(stream->channel_name, DEFAULT_METADATA_NAME, NAME_MAX)) {
+ if (!strncmp(stream->channel_name, DEFAULT_METADATA_NAME,
LTTNG_
NAME_MAX)) {
stream->is_metadata = 1;
}
stream->is_metadata = 1;
}
@@
-307,9
+306,9
@@
static void stream_release(struct urcu_ref *ref)
stream_fd_put(stream->stream_fd);
stream->stream_fd = NULL;
}
stream_fd_put(stream->stream_fd);
stream->stream_fd = NULL;
}
- if (stream->index_f
d
) {
-
stream_fd_put(stream->index_fd
);
- stream->index_f
d
= NULL;
+ if (stream->index_f
ile
) {
+
lttng_index_file_put(stream->index_file
);
+ stream->index_f
ile
= NULL;
}
if (stream->trace) {
ctf_trace_put(stream->trace);
}
if (stream->trace) {
ctf_trace_put(stream->trace);
@@
-447,6
+446,10
@@
void print_relay_streams(void)
struct lttng_ht_iter iter;
struct relay_stream *stream;
struct lttng_ht_iter iter;
struct relay_stream *stream;
+ if (!relay_streams_ht) {
+ return;
+ }
+
rcu_read_lock();
cds_lfht_for_each_entry(relay_streams_ht->ht, &iter.iter, stream,
node.node) {
rcu_read_lock();
cds_lfht_for_each_entry(relay_streams_ht->ht, &iter.iter, stream,
node.node) {
This page took
0.024989 seconds
and
4
git commands to generate.