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 stream set close_flag on stream close
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
main.c
diff --git
a/src/bin/lttng-relayd/main.c
b/src/bin/lttng-relayd/main.c
index 60b6bf2214e8bee4d0266000a1db592982384940..3a6bebaf7d6d3dc1ab5f7cf4fe76522d6f5c56fd 100644
(file)
--- a/
src/bin/lttng-relayd/main.c
+++ b/
src/bin/lttng-relayd/main.c
@@
-44,6
+44,7
@@
#include <common/common.h>
#include <common/compat/poll.h>
#include <common/compat/socket.h>
#include <common/common.h>
#include <common/compat/poll.h>
#include <common/compat/socket.h>
+#include <common/compat/endian.h>
#include <common/defaults.h>
#include <common/daemonize.h>
#include <common/futex.h>
#include <common/defaults.h>
#include <common/daemonize.h>
#include <common/futex.h>
@@
-250,7
+251,10
@@
int set_option(int opt, const char *arg, const char *optname)
if (arg) {
lttng_opt_verbose = config_parse_value(arg);
} else {
if (arg) {
lttng_opt_verbose = config_parse_value(arg);
} else {
- lttng_opt_verbose += 1;
+ /* Only 3 level of verbosity (-vvv). */
+ if (lttng_opt_verbose < 3) {
+ lttng_opt_verbose += 1;
+ }
}
break;
default:
}
break;
default:
@@
-382,8
+386,9
@@
int set_options(int argc, char **argv)
/* assign default values */
if (control_uri == NULL) {
/* assign default values */
if (control_uri == NULL) {
- ret = asprintf(&default_address, "tcp://0.0.0.0:%d",
- DEFAULT_NETWORK_CONTROL_PORT);
+ ret = asprintf(&default_address,
+ "tcp://" DEFAULT_NETWORK_CONTROL_BIND_ADDRESS ":%d",
+ DEFAULT_NETWORK_CONTROL_PORT);
if (ret < 0) {
PERROR("asprintf default data address");
goto exit;
if (ret < 0) {
PERROR("asprintf default data address");
goto exit;
@@
-397,8
+402,9
@@
int set_options(int argc, char **argv)
}
}
if (data_uri == NULL) {
}
}
if (data_uri == NULL) {
- ret = asprintf(&default_address, "tcp://0.0.0.0:%d",
- DEFAULT_NETWORK_DATA_PORT);
+ ret = asprintf(&default_address,
+ "tcp://" DEFAULT_NETWORK_DATA_BIND_ADDRESS ":%d",
+ DEFAULT_NETWORK_DATA_PORT);
if (ret < 0) {
PERROR("asprintf default data address");
goto exit;
if (ret < 0) {
PERROR("asprintf default data address");
goto exit;
@@
-412,8
+418,9
@@
int set_options(int argc, char **argv)
}
}
if (live_uri == NULL) {
}
}
if (live_uri == NULL) {
- ret = asprintf(&default_address, "tcp://0.0.0.0:%d",
- DEFAULT_NETWORK_VIEWER_PORT);
+ ret = asprintf(&default_address,
+ "tcp://" DEFAULT_NETWORK_VIEWER_BIND_ADDRESS ":%d",
+ DEFAULT_NETWORK_VIEWER_PORT);
if (ret < 0) {
PERROR("asprintf default viewer control address");
goto exit;
if (ret < 0) {
PERROR("asprintf default viewer control address");
goto exit;
@@
-1198,6
+1205,7
@@
int relay_add_stream(struct lttcomm_relayd_hdr *recv_hdr,
stream->session_id = session->id;
stream->index_fd = -1;
stream->read_index_fd = -1;
stream->session_id = session->id;
stream->index_fd = -1;
stream->read_index_fd = -1;
+ stream->ctf_stream_id = -1ULL;
lttng_ht_node_init_u64(&stream->node, stream->stream_handle);
pthread_mutex_init(&stream->lock, NULL);
lttng_ht_node_init_u64(&stream->node, stream->stream_handle);
pthread_mutex_init(&stream->lock, NULL);
@@
-1956,6
+1964,9
@@
int relay_recv_index(struct lttcomm_relayd_hdr *recv_hdr,
}
copy_index_control_data(index, &index_info);
}
copy_index_control_data(index, &index_info);
+ if (stream->ctf_stream_id == -1ULL) {
+ stream->ctf_stream_id = be64toh(index_info.stream_id);
+ }
if (index_created) {
/*
if (index_created) {
/*
@@
-2386,7
+2397,7
@@
static void destroy_connection(struct lttng_ht *relay_connections_ht,
connection_delete(relay_connections_ht, conn);
/* For the control socket, we try to destroy the session. */
connection_delete(relay_connections_ht, conn);
/* For the control socket, we try to destroy the session. */
- if (conn->type == RELAY_CONTROL) {
+ if (conn->type == RELAY_CONTROL
&& conn->session
) {
destroy_session(conn->session, conn->sessions_ht);
}
destroy_session(conn->session, conn->sessions_ht);
}
This page took
0.026577 seconds
and
4
git commands to generate.