X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fcreate.c;h=d075f64b90742c08b8463058440c7c2722fbc316;hp=525464aa822d90b556308d830196eb38ed92b898;hb=4fc83d948cea6b10484e65f004a6c167e71ac440;hpb=38b4ef1b199ddb15db78774a39e9c524ca7e2d24 diff --git a/src/bin/lttng/commands/create.c b/src/bin/lttng/commands/create.c index 525464aa8..d075f64b9 100644 --- a/src/bin/lttng/commands/create.c +++ b/src/bin/lttng/commands/create.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include @@ -51,6 +51,12 @@ static int opt_no_output; static int opt_snapshot; static unsigned int opt_live_timer; +#ifdef LTTNG_EMBED_HELP +static const char help_msg[] = +#include +; +#endif + enum { OPT_HELP = 1, OPT_LIST_OPTIONS, @@ -141,18 +147,15 @@ static int set_consumer_url(const char *session_name, const char *ctrl_url, { int ret; struct lttng_handle *handle; - struct lttng_domain dom; assert(session_name); /* - * Set handle with the session name and the domain set to 0. This means to - * the session daemon that the next action applies on the tracing session - * rather then the domain specific session. + * Set handle with the session_name, but no domain. This implies that + * the actions taken with this handle apply on the tracing session + * rather then the domain-specific session. */ - memset(&dom, 0, sizeof(dom)); - - handle = lttng_create_handle(session_name, &dom); + handle = lttng_create_handle(session_name, NULL); if (handle == NULL) { ret = CMD_FATAL; goto error; @@ -345,6 +348,10 @@ static int create_session(void) /* Use default live URL if NO url is/are found. */ if ((opt_live_timer && !opt_url) && (opt_live_timer && !opt_data_url)) { + /* Override the url */ + free(url); + url = NULL; + ret = asprintf(&alloc_url, "net://127.0.0.1"); if (ret < 0) { PERROR("asprintf default live URL"); @@ -442,7 +449,7 @@ static int create_session(void) MSG("Default snapshot output set to: %s", print_str_url); } MSG("Snapshot mode set. Every channel enabled for that session will " - "be set in overwrite mode and mmap output."); + "be set to mmap output, and default to overwrite mode."); } if (opt_shm_path) { MSG("Session %s set to shm_path: %s.", session_name,