*/
int lttng_start_tracing(const char *session_name)
{
- copy_string(lsm.session_name, session_name, NAME_MAX);
+ copy_string(lsm.session.name, session_name, NAME_MAX);
return ask_sessiond(LTTNG_START_TRACE, NULL);
}
*/
int lttng_stop_tracing(const char *session_name)
{
- copy_string(lsm.session_name, session_name, NAME_MAX);
+ copy_string(lsm.session.name, session_name, NAME_MAX);
return ask_sessiond(LTTNG_STOP_TRACE, NULL);
}
*/
int lttng_create_session(const char *name, const char *path)
{
- copy_string(lsm.session_name, name, NAME_MAX);
- copy_string(lsm.path, path, PATH_MAX);
+ copy_string(lsm.session.name, name, NAME_MAX);
+ copy_string(lsm.session.path, path, PATH_MAX);
return ask_sessiond(LTTNG_CREATE_SESSION, NULL);
}
*/
int lttng_destroy_session(const char *name)
{
- copy_string(lsm.session_name, name, NAME_MAX);
+ copy_string(lsm.session.name, name, NAME_MAX);
return ask_sessiond(LTTNG_DESTROY_SESSION, NULL);
}
{
int ret;
- copy_string(lsm.session_name, session_name, NAME_MAX);
+ copy_string(lsm.session.name, session_name, NAME_MAX);
ret = ask_sessiond(LTTNG_LIST_DOMAINS, (void**) domains);
if (ret < 0) {
return ret;
{
int ret;
- copy_string(lsm.session_name, session_name, NAME_MAX);
+ copy_string(lsm.session.name, session_name, NAME_MAX);
copy_lttng_domain(domain);
ret = ask_sessiond(LTTNG_LIST_CHANNELS, (void**) channels);
{
int ret;
- copy_string(lsm.session_name, session_name, NAME_MAX);
+ copy_string(lsm.session.name, session_name, NAME_MAX);
copy_string(lsm.u.list.channel_name, channel_name, NAME_MAX);
copy_lttng_domain(domain);
*/
void lttng_set_session_name(const char *name)
{
- copy_string(lsm.session_name, name, NAME_MAX);
+ copy_string(lsm.session.name, name, NAME_MAX);
}
/*
case LTTNG_LIST_TRACEPOINTS:
break;
default:
- DBG("Getting session %s by name", cmd_ctx->lsm->session_name);
- cmd_ctx->session = find_session_by_name(cmd_ctx->lsm->session_name);
+ DBG("Getting session %s by name", cmd_ctx->lsm->session.name);
+ cmd_ctx->session = find_session_by_name(cmd_ctx->lsm->session.name);
if (cmd_ctx->session == NULL) {
/* If session name not found */
- if (cmd_ctx->lsm->session_name != NULL) {
+ if (cmd_ctx->lsm->session.name != NULL) {
ret = LTTCOMM_SESS_NOT_FOUND;
} else { /* If no session name specified */
ret = LTTCOMM_SELECT_SESS;
goto setup_error;
}
- ret = create_session(cmd_ctx->lsm->session_name, cmd_ctx->lsm->path);
+ ret = create_session(cmd_ctx->lsm->session.name, cmd_ctx->lsm->session.path);
if (ret < 0) {
if (ret == -EEXIST) {
ret = LTTCOMM_EXIST_SESS;
/* Clean kernel session teardown */
teardown_kernel_session(cmd_ctx->session);
- ret = destroy_session(cmd_ctx->lsm->session_name);
+ ret = destroy_session(cmd_ctx->lsm->session.name);
if (ret < 0) {
ret = LTTCOMM_FATAL;
goto error;