Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
if (errno != ENOENT) {
PERROR("stat");
}
if (errno != ENOENT) {
PERROR("stat");
}
- ret = -LTTNG_ERR_INVALID;
/* Not found. Allocate one. */
relayd = consumer_allocate_relayd_sock_pair(net_seq_idx);
if (relayd == NULL) {
/* Not found. Allocate one. */
relayd = consumer_allocate_relayd_sock_pair(net_seq_idx);
if (relayd == NULL) {
ret_code = LTTCOMM_CONSUMERD_ENOMEM;
goto error;
} else {
ret_code = LTTCOMM_CONSUMERD_ENOMEM;
goto error;
} else {
if (ret) {
/* Needing to exit in the middle of a command: error. */
lttng_consumer_send_error(ctx, LTTCOMM_CONSUMERD_POLL_ERROR);
if (ret) {
/* Needing to exit in the middle of a command: error. */
lttng_consumer_send_error(ctx, LTTCOMM_CONSUMERD_POLL_ERROR);
goto error_nosignal;
}
/* Get relayd socket from session daemon */
ret = lttcomm_recv_fds_unix_sock(sock, &fd, 1);
if (ret != sizeof(fd)) {
goto error_nosignal;
}
/* Get relayd socket from session daemon */
ret = lttcomm_recv_fds_unix_sock(sock, &fd, 1);
if (ret != sizeof(fd)) {
fd = -1; /* Just in case it gets set with an invalid value. */
/*
fd = -1; /* Just in case it gets set with an invalid value. */
/*
break;
default:
ERR("Unknown relayd socket type (%d)", sock_type);
break;
default:
ERR("Unknown relayd socket type (%d)", sock_type);
ret_code = LTTCOMM_CONSUMERD_FATAL;
goto error;
}
ret_code = LTTCOMM_CONSUMERD_FATAL;
goto error;
}