#include <lttng/destruction-handle.h>
#include <lttng/rotation.h>
-#include <common/optional.h>
-#include <common/compat/poll.h>
-#include <common/compat/time.h>
-#include <common/macros.h>
-#include <common/compat/poll.h>
-#include <common/dynamic-buffer.h>
-#include <common/buffer-view.h>
-#include <common/sessiond-comm/sessiond-comm.h>
-#include <lttng/location-internal.h>
-#include "lttng-ctl-helper.h"
+#include <common/optional.hpp>
+#include <common/compat/poll.hpp>
+#include <common/compat/time.hpp>
+#include <common/macros.hpp>
+#include <common/compat/poll.hpp>
+#include <common/dynamic-buffer.hpp>
+#include <common/buffer-view.hpp>
+#include <common/sessiond-comm/sessiond-comm.hpp>
+#include <lttng/location-internal.hpp>
+#include "lttng-ctl-helper.hpp"
#include <algorithm>
#include <stdbool.h>
int sessiond_socket)
{
int ret;
- struct lttng_destruction_handle *handle = (lttng_destruction_handle *) zmalloc(sizeof(*handle));
+ struct lttng_destruction_handle *handle = zmalloc<lttng_destruction_handle>();
if (!handle) {
goto end;
}
ret = lttng_poll_add(&handle->communication.events, sessiond_socket,
- LPOLLIN | LPOLLHUP | LPOLLRDHUP | LPOLLERR);
+ LPOLLIN | LPOLLRDHUP);
if (ret) {
goto error;
}
ssize_t comm_ret;
enum lttng_error_code ret_code = LTTNG_OK;
struct lttcomm_session_msg lsm = {
- .cmd_type = LTTNG_DESTROY_SESSION,
+ .cmd_type = LTTCOMM_SESSIOND_COMMAND_DESTROY_SESSION,
.session = {},
.domain = {},
.u = {},