X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Fmain.c;h=ac03cf846a7ec7992d7c21f9423d0af6813f22db;hp=d82a3412d7b8578be8f5b39abf0a9fd949ff07bc;hb=849e5b7b78004e931773838ab3fe1a19c843c01c;hpb=cd2ef1ef1d54ced9e4d0d03b865bb7fc6a905f80 diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index d82a3412d..ac03cf846 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -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 { - lttng_opt_verbose += 1; + /* Only 3 level of verbosity (-vvv). */ + if (lttng_opt_verbose < 3) { + lttng_opt_verbose += 1; + } } break; default: @@ -1340,18 +1344,6 @@ int relay_close_stream(struct lttcomm_relayd_hdr *recv_hdr, session->stream_count--; assert(session->stream_count >= 0); - /* - * Remove the stream from the connection recv list since we are about to - * flag it invalid and thus might be freed. This has to be done here since - * only the control thread can do actions on that list. - * - * Note that this stream might NOT be in the list but we have to try to - * remove it here else this can race with the stream destruction freeing - * the object and the connection destroy doing a use after free when - * deleting the remaining nodes in this list. - */ - cds_list_del(&stream->recv_list); - /* Check if we can close it or else the data will do it. */ try_close_stream(session, stream);