Move health comm to health-internal.h
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 24 Sep 2013 16:20:41 +0000 (12:20 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 9 Oct 2013 13:16:58 +0000 (09:16 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/health-internal.h
src/bin/lttng-sessiond/main.c
src/common/sessiond-comm/sessiond-comm.h
src/lib/lttng-ctl/lttng-ctl.c

index 764e998e3045c87f7c893fdc4bbcaa22ff7a0f0f..f4270647f8f999a79a22bc0fef945e913facde0e 100644 (file)
@@ -59,6 +59,19 @@ struct health_state {
        struct cds_list_head node;
 };
 
+enum health_cmd {
+       HEALTH_CMD_CHECK                = 0,
+};
+
+struct health_comm_msg {
+       uint32_t component;
+       uint32_t cmd;           /* enum health_cmd */
+} LTTNG_PACKED;
+
+struct health_comm_reply {
+       uint32_t ret_code;
+} LTTNG_PACKED;
+
 /* Declare TLS health state. */
 extern DECLARE_URCU_TLS(struct health_state, health_state);
 
index 550aa1b83f68d65f01e936d1e81fb5308b0b2b4e..e119c8bf0305f6d19084dcfe04f9f12abbe12c9e 100644 (file)
@@ -3457,8 +3457,8 @@ static void *thread_manage_health(void *data)
        int sock = -1, new_sock = -1, ret, i, pollfd, err = -1;
        uint32_t revents, nb_fd;
        struct lttng_poll_event events;
-       struct lttcomm_health_msg msg;
-       struct lttcomm_health_data reply;
+       struct health_comm_msg msg;
+       struct health_comm_reply reply;
 
        DBG("[thread] Manage health check started");
 
index f86ba732301aa6c6d1b035eb822c15bebd884438..229b91e5901cae11e83a4675f48c047e8e07c32f 100644 (file)
@@ -81,7 +81,7 @@ enum lttcomm_sessiond_command {
        LTTNG_ENABLE_CONSUMER               = 20,
        LTTNG_SET_CONSUMER_URI              = 21,
        LTTNG_ENABLE_EVENT_WITH_FILTER      = 22,
-       LTTNG_HEALTH_CHECK                  = 23,
+       /* Unused */
        LTTNG_DATA_PENDING                  = 24,
        LTTNG_SNAPSHOT_ADD_OUTPUT           = 25,
        LTTNG_SNAPSHOT_DEL_OUTPUT           = 26,
@@ -300,15 +300,6 @@ struct lttcomm_lttng_output_id {
        uint32_t id;
 } LTTNG_PACKED;
 
-struct lttcomm_health_msg {
-       uint32_t component;
-       uint32_t cmd;
-} LTTNG_PACKED;
-
-struct lttcomm_health_data {
-       uint32_t ret_code;
-} LTTNG_PACKED;
-
 /*
  * lttcomm_consumer_msg is the message sent from sessiond to consumerd
  * to either add a channel, add a stream, update a stream, or stop
index e6dbb678f265e58ae815234e965cfe7c486e69b4..0efc1591510fbff0b1eebf8f4e0bd313166204a6 100644 (file)
@@ -34,6 +34,7 @@
 #include <common/uri.h>
 #include <common/utils.h>
 #include <lttng/lttng.h>
+#include <lttng/health-internal.h>
 
 #include "filter/filter-ast.h"
 #include "filter/filter-parser.h"
@@ -1412,8 +1413,8 @@ static int set_health_socket_path(void)
 int lttng_health_check(enum lttng_health_component c)
 {
        int sock, ret;
-       struct lttcomm_health_msg msg;
-       struct lttcomm_health_data reply;
+       struct health_comm_msg msg;
+       struct health_comm_reply reply;
 
        /* Connect to the sesssion daemon */
        sock = lttcomm_connect_unix_sock(health_sock_path);
@@ -1422,7 +1423,7 @@ int lttng_health_check(enum lttng_health_component c)
                goto error;
        }
 
-       msg.cmd = LTTNG_HEALTH_CHECK;
+       msg.cmd = HEALTH_CMD_CHECK;
        msg.component = c;
 
        ret = lttcomm_send_unix_sock(sock, (void *)&msg, sizeof(msg));
This page took 0.032454 seconds and 5 git commands to generate.