*/
#define _GNU_SOURCE
+#include <assert.h>
#include <fcntl.h>
#include <poll.h>
#include <pthread.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
-#include <urcu/list.h>
-#include <assert.h>
+#include <lttng-kernel-ctl.h>
+#include <lttng-sessiond-comm.h>
#include <lttng/lttng-kconsumerd.h>
-
-#include "kernelctl.h"
-#include "lttngerr.h"
-#include "lttng-sessiond-comm.h"
+#include <lttngerr.h>
static struct lttng_kconsumerd_global_data {
/*
goto error;
}
+ ctx->kconsumerd_error_socket = -1;
/* assign the callbacks */
ctx->on_buffer_ready = buffer_ready;
ctx->on_recv_fd = recv_fd;
DBG("Sending ready command to ltt-sessiond");
ret = lttng_kconsumerd_send_error(ctx, KCONSUMERD_COMMAND_SOCK_READY);
+ /* return < 0 on error, but == 0 is not fatal */
if (ret < 0) {
ERR("Error sending ready command to ltt-sessiond");
goto end;
/*
* Send return code to the session daemon.
+ * If the socket is not defined, we return 0, it is not a fatal error
*/
int lttng_kconsumerd_send_error(
struct lttng_kconsumerd_local_data *ctx, int cmd)