sessiond-comm: prefix lttcomm_sessiond_command entries
[lttng-tools.git] / src / lib / lttng-ctl / clear.cpp
index 0eaf97364ce9c14f8c02fdd4b48e945b7d1ab81b..b205ac8f2b8af75e8584d5ba3b378f9c9f2562c9 100644 (file)
 #include <lttng/lttng-error.h>
 #include <lttng/clear.h>
 #include <lttng/clear-handle.h>
-#include <common/sessiond-comm/sessiond-comm.h>
-#include <common/macros.h>
-#include <common/compat/poll.h>
-#include <common/dynamic-buffer.h>
-#include <common/buffer-view.h>
-#include <common/optional.h>
+#include <common/sessiond-comm/sessiond-comm.hpp>
+#include <common/macros.hpp>
+#include <common/compat/poll.hpp>
+#include <common/dynamic-buffer.hpp>
+#include <common/buffer-view.hpp>
+#include <common/optional.hpp>
 
-#include "lttng-ctl-helper.h"
+#include "lttng-ctl-helper.hpp"
 
 enum communication_state {
        COMMUNICATION_STATE_RECEIVE_LTTNG_MSG,
@@ -64,7 +64,7 @@ static
 struct lttng_clear_handle *lttng_clear_handle_create(int sessiond_socket)
 {
        int ret;
-       struct lttng_clear_handle *handle = (lttng_clear_handle *) zmalloc(sizeof(*handle));
+       struct lttng_clear_handle *handle = zmalloc<lttng_clear_handle>();
 
        if (!handle) {
                goto end;
@@ -282,7 +282,11 @@ enum lttng_error_code lttng_clear_session(const char *session_name,
        enum lttng_error_code ret_code = LTTNG_OK;
        struct lttng_clear_handle *handle = NULL;
        struct lttcomm_session_msg lsm = {
-               .cmd_type = LTTNG_CLEAR_SESSION,
+               .cmd_type = LTTCOMM_SESSIOND_COMMAND_CLEAR_SESSION,
+               .session = {},
+               .domain = {},
+               .u = {},
+               .fd_count = 0,
        };
        int sessiond_socket = -1;
        ssize_t comm_ret;
This page took 0.023529 seconds and 4 git commands to generate.