}
DBG("Sending ready command to ltt-sessiond");
ret = send_error(KCONSUMERD_COMMAND_SOCK_READY);
if (ret < 0) {
ERR("Error sending ready command to ltt-sessiond");
}
DBG("Sending ready command to ltt-sessiond");
ret = send_error(KCONSUMERD_COMMAND_SOCK_READY);
if (ret < 0) {
ERR("Error sending ready command to ltt-sessiond");
}
/* Blocking call, waiting for transmission */
sock = lttcomm_accept_unix_sock(client_socket);
if (sock <= 0) {
WARN("On accept");
}
/* Blocking call, waiting for transmission */
sock = lttcomm_accept_unix_sock(client_socket);
if (sock <= 0) {
WARN("On accept");
}
while (1) {
/* We first get the number of fd we are about to receive */
ret = lttcomm_recv_unix_sock(sock, &tmp,
sizeof(struct lttcomm_kconsumerd_header));
if (ret <= 0) {
}
while (1) {
/* We first get the number of fd we are about to receive */
ret = lttcomm_recv_unix_sock(sock, &tmp,
sizeof(struct lttcomm_kconsumerd_header));
if (ret <= 0) {
ret = consumerd_recv_fd(sock, tmp.payload_size, tmp.cmd_type);
if (ret <= 0) {
ERR("Receiving the FD, exiting");
ret = consumerd_recv_fd(sock, tmp.payload_size, tmp.cmd_type);
if (ret <= 0) {
ERR("Receiving the FD, exiting");
switch(pollfd[i].revents) {
case POLLERR:
ERR("Error returned in polling fd %d.", pollfd[i].fd);
switch(pollfd[i].revents) {
case POLLERR:
ERR("Error returned in polling fd %d.", pollfd[i].fd);
/* If every buffer FD has hung up, we end the read loop here */
if (nb_fd > 0 && num_hup == nb_fd) {
DBG("every buffer FD has hung up\n");
/* If every buffer FD has hung up, we end the read loop here */
if (nb_fd > 0 && num_hup == nb_fd) {
DBG("every buffer FD has hung up\n");