This patch makes the bt_common_parse_lttng_live_url() function not
accept LTTng live URLs with the form:
net[4]://RDHOST[:RDPORT]/host/TGTHOST
This was previously accepted for the session listing feature, but in
fact the `babeltrace` program (Babeltrace 1) only accepts this form:
net[4]://RDHOST[:RDPORT]
and the list of URLs that the `babeltrace2` program prints with the
first form is invalid.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I68a804c69ec557ed9cc77c9020afbbe2f79a7c43
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1961
Tested-by: jenkins <jenkins@lttng.org>
if (strncmp(at, "://", 3) != 0) {
if (error_buf) {
snprintf(error_buf, error_buf_size,
if (strncmp(at, "://", 3) != 0) {
if (error_buf) {
snprintf(error_buf, error_buf_size,
}
if (at[end_pos] == '\0') {
}
if (at[end_pos] == '\0') {
+ /* Relay daemon hostname and ports provided only */
goto end;
}
at += end_pos;
goto end;
}
at += end_pos;
if (strncmp(at, "/host/", 6) != 0) {
if (error_buf) {
snprintf(error_buf, error_buf_size,
if (strncmp(at, "/host/", 6) != 0) {
if (error_buf) {
snprintf(error_buf, error_buf_size,
}
if (at[end_pos] == '\0') {
}
if (at[end_pos] == '\0') {
+ if (error_buf) {
+ snprintf(error_buf, error_buf_size,
+ "Missing `/` after target hostname (`%s`)",
+ parts.target_hostname->str);
+ }
+
+ goto error;
at += end_pos + 1;
/* Session name */
at += end_pos + 1;
/* Session name */