consumer_data->cmd_sock =
lttcomm_connect_unix_sock(consumer_data->cmd_unix_sock_path);
if (consumer_data->cmd_sock < 0) {
consumer_data->cmd_sock =
lttcomm_connect_unix_sock(consumer_data->cmd_unix_sock_path);
if (consumer_data->cmd_sock < 0) {
sizeof(consumer->subdir) - strlen(consumer->subdir) - 1);
DBG3("Copy session consumer subdir %s", consumer->subdir);
sizeof(consumer->subdir) - strlen(consumer->subdir) - 1);
DBG3("Copy session consumer subdir %s", consumer->subdir);
/* Copy session output to the newly created UST session */
ret = copy_session_consumer(domain->type, session);
/* Copy session output to the newly created UST session */
ret = copy_session_consumer(domain->type, session);
/* Copy session output to the newly created Kernel session */
ret = copy_session_consumer(LTTNG_DOMAIN_KERNEL, session);
/* Copy session output to the newly created Kernel session */
ret = copy_session_consumer(LTTNG_DOMAIN_KERNEL, session);
if (cmd_ctx->lsm->cmd_type == LTTNG_REGISTER_CONSUMER) {
pthread_mutex_lock(&kconsumer_data.pid_mutex);
if (kconsumer_data.pid > 0) {
if (cmd_ctx->lsm->cmd_type == LTTNG_REGISTER_CONSUMER) {
pthread_mutex_lock(&kconsumer_data.pid_mutex);
if (kconsumer_data.pid > 0) {
cmd_ctx->session = session_find_by_name(cmd_ctx->lsm->session.name);
if (cmd_ctx->session == NULL) {
if (cmd_ctx->lsm->session.name != NULL) {
cmd_ctx->session = session_find_by_name(cmd_ctx->lsm->session.name);
if (cmd_ctx->session == NULL) {
if (cmd_ctx->lsm->session.name != NULL) {
/* Consumer is in an ERROR state. Report back to client */
if (uatomic_read(&kernel_consumerd_state) == CONSUMER_ERROR) {
/* Consumer is in an ERROR state. Report back to client */
if (uatomic_read(&kernel_consumerd_state) == CONSUMER_ERROR) {
{
/* Consumer is in an ERROR state. Report back to client */
if (uatomic_read(&ust_consumerd_state) == CONSUMER_ERROR) {
{
/* Consumer is in an ERROR state. Report back to client */
if (uatomic_read(&ust_consumerd_state) == CONSUMER_ERROR) {
if (cmd_ctx->session->ust_session == NULL) {
ret = create_ust_session(cmd_ctx->session,
&cmd_ctx->lsm->domain);
if (cmd_ctx->session->ust_session == NULL) {
ret = create_ust_session(cmd_ctx->session,
&cmd_ctx->lsm->domain);
if (!session_access_ok(cmd_ctx->session,
LTTNG_SOCK_GET_UID_CRED(&cmd_ctx->creds),
LTTNG_SOCK_GET_GID_CRED(&cmd_ctx->creds))) {
if (!session_access_ok(cmd_ctx->session,
LTTNG_SOCK_GET_UID_CRED(&cmd_ctx->creds),
LTTNG_SOCK_GET_GID_CRED(&cmd_ctx->creds))) {
goto error;
}
if (nb_uri == 1 && uris[0].dtype != LTTNG_DST_PATH) {
DBG("Creating session with ONE network URI is a bad call");
goto error;
}
if (nb_uri == 1 && uris[0].dtype != LTTNG_DST_PATH) {
DBG("Creating session with ONE network URI is a bad call");
nb_chan = cmd_list_channels(cmd_ctx->lsm->domain.type,
cmd_ctx->session, &channels);
if (nb_chan < 0) {
nb_chan = cmd_list_channels(cmd_ctx->lsm->domain.type,
cmd_ctx->session, &channels);
if (nb_chan < 0) {
nb_event = cmd_list_events(cmd_ctx->lsm->domain.type, cmd_ctx->session,
cmd_ctx->lsm->u.list.channel_name, &events);
if (nb_event < 0) {
nb_event = cmd_list_events(cmd_ctx->lsm->domain.type, cmd_ctx->session,
cmd_ctx->lsm->u.list.channel_name, &events);
if (nb_event < 0) {