X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fcmd.c;h=c17be934af50f6a589b7e1feef51fddbd70dbcea;hb=abda88ad06a238652230a7d19f0775a7a75d3dc4;hp=10fd45757397257d84a4da8c48de3385964c9fcd;hpb=a46a2b7634ad9f6970a87ae5ca2d462db53c059e;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 10fd45757..c17be934a 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -912,6 +912,10 @@ static enum lttng_error_code add_uri_to_consumer( ret = lttng_strncpy(consumer->dst.session_root_path, uri->dst.path, sizeof(consumer->dst.session_root_path)); + if (ret) { + ret_code = LTTNG_ERR_FATAL; + goto error; + } consumer->type = CONSUMER_DST_LOCAL; break; } @@ -4991,6 +4995,9 @@ int cmd_rotate_get_info(struct ltt_session *session, } break; case CONSUMER_DST_NET: + { + uint16_t ctrl_port, data_port; + current_tracing_path_reply = info_return->location.relay.relative_path; current_tracing_path_reply_len = @@ -5009,9 +5016,9 @@ int cmd_rotate_get_info(struct ltt_session *session, goto end; } - session_get_net_consumer_ports(session, - &info_return->location.relay.ports.control, - &info_return->location.relay.ports.data); + session_get_net_consumer_ports(session, &ctrl_port, &data_port); + info_return->location.relay.ports.control = ctrl_port; + info_return->location.relay.ports.data = data_port; info_return->location_type = (int8_t) LTTNG_TRACE_ARCHIVE_LOCATION_TYPE_RELAY; chunk_path = strdup(session->last_chunk_path); @@ -5022,6 +5029,7 @@ int cmd_rotate_get_info(struct ltt_session *session, goto end; } break; + } default: abort(); }