Add a consumer daemon INIT command
[lttng-tools.git] / src / bin / lttng-sessiond / consumer.c
index 12db236d08335c34221c7305527be81c049f97d1..336c7607104e1a982cb0f62b0622e9e65eb81bf9 100644 (file)
@@ -1894,3 +1894,27 @@ error:
        health_code_update();
        return ret;
 }
+
+int consumer_init(struct consumer_socket *socket,
+               const lttng_uuid sessiond_uuid)
+{
+       int ret;
+       struct lttcomm_consumer_msg msg = {
+               .cmd_type = LTTNG_CONSUMER_INIT,
+       };
+
+       assert(socket);
+
+       DBG("Sending consumer initialization command");
+       lttng_uuid_copy(msg.u.init.sessiond_uuid, sessiond_uuid);
+
+       health_code_update();
+       ret = consumer_send_msg(socket, &msg);
+       if (ret < 0) {
+               goto error;
+       }
+
+error:
+       health_code_update();
+       return ret;
+}
This page took 0.023194 seconds and 4 git commands to generate.