descriptor = lttng_session_descriptor_live_network_create(
opt_session_name, uri_str1, uri_str2,
opt_live_timer);
-
} else {
/* Regular session. */
switch (output_type) {
}
if (!descriptor) {
ERR("Failed to initialize session creation command.");
+ } else {
+ /*
+ * Auto-launch the relay daemon when a live session
+ * is created using default URLs.
+ */
+ if (!opt_url && !opt_ctrl_url && !opt_data_url &&
+ opt_live_timer && !check_relayd()) {
+ int ret;
+ const char *pathname = opt_relayd_path ? :
+ INSTALL_BIN_PATH "/lttng-relayd";
+
+ ret = spawn_relayd(pathname, 0);
+ if (ret < 0) {
+ lttng_session_descriptor_destroy(descriptor);
+ descriptor = NULL;
+ }
+ }
}
end:
free(uris);
return ret;
}
+static
int validate_url_option_combination(void)
{
int ret = 0;