X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fcmd.c;h=386b99ae216504e86cf9225f300816791e4f4234;hp=e4e03e88cd3905a0e1321eed49199cc0ab5368e1;hb=9aa9f90096acb57bdc6939920bea9fc7e4f60231;hpb=9b6c7ec5aebd1b1e3610ea54bbd0d6d4e9efaa82 diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index e4e03e88c..386b99ae2 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -101,11 +101,22 @@ static int build_network_session_path(char *dst, size_t size, goto error; } + /* + * Do we have a UST url set. If yes, this means we have both kernel and UST + * to print. + */ if (strlen(tmp_uurl) > 0) { ret = snprintf(dst, size, "[K]: %s [data: %d] -- [U]: %s [data: %d]", tmp_urls, kdata_port, tmp_uurl, udata_port); } else { - ret = snprintf(dst, size, "%s [data: %d]", tmp_urls, kdata_port); + int dport; + if (kuri) { + dport = kdata_port; + } else { + /* No kernel URI, use the UST port. */ + dport = udata_port; + } + ret = snprintf(dst, size, "%s [data: %d]", tmp_urls, dport); } error: