const bool has_timeout = timeout_ms > 0;
struct timespec initial_time;
+ if (!handle) {
+ status = LTTNG_DESTRUCTION_HANDLE_STATUS_INVALID;
+ goto end;
+ }
+
if (handle->communication.state == COMMUNICATION_STATE_ERROR) {
status = LTTNG_DESTRUCTION_HANDLE_STATUS_ERROR;
goto end;
enum lttng_destruction_handle_status status =
LTTNG_DESTRUCTION_HANDLE_STATUS_OK;
+ if (!handle || !rotation_state) {
+ status = LTTNG_DESTRUCTION_HANDLE_STATUS_INVALID;
+ goto end;
+ }
+
if (!handle->rotation_state.is_set) {
status = LTTNG_DESTRUCTION_HANDLE_STATUS_INVALID;
goto end;
enum lttng_destruction_handle_status status =
LTTNG_DESTRUCTION_HANDLE_STATUS_OK;
+ if (!handle || !location) {
+ status = LTTNG_DESTRUCTION_HANDLE_STATUS_INVALID;
+ goto end;
+ }
+
if (!handle->location) {
status = LTTNG_DESTRUCTION_HANDLE_STATUS_INVALID;
goto end;
enum lttng_destruction_handle_status status =
LTTNG_DESTRUCTION_HANDLE_STATUS_OK;
+ if (!handle || !result) {
+ status = LTTNG_DESTRUCTION_HANDLE_STATUS_INVALID;
+ goto end;
+ }
+
if (!handle->destruction_return_code.is_set) {
status = LTTNG_DESTRUCTION_HANDLE_STATUS_INVALID;
goto end;
int sessiond_socket = -1;
struct lttng_destruction_handle *handle = NULL;
+ if (!session_name || !_handle) {
+ ret_code = LTTNG_ERR_INVALID;
+ goto error;
+ }
+
ret = lttng_strncpy(lsm.session.name, session_name,
sizeof(lsm.session.name));
if (ret) {
goto error;
}
- comm_ret = lttcomm_send_unix_sock(sessiond_socket, &lsm, sizeof(lsm));
+ comm_ret = lttcomm_send_creds_unix_sock(sessiond_socket, &lsm, sizeof(lsm));
if (comm_ret < 0) {
ret_code = LTTNG_ERR_FATAL;
goto error;
error:
if (sessiond_socket >= 0) {
ret = close(sessiond_socket);
- PERROR("Failed to close the LTTng session daemon connection socket");
+ if (ret < 0) {
+ PERROR("Failed to close the LTTng session daemon connection socket");
+ }
}
if (handle) {
lttng_destruction_handle_destroy(handle);