projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bin: compile lttng-consumerd as a C++
[lttng-tools.git]
/
src
/
lib
/
lttng-ctl
/
destruction-handle.c
diff --git
a/src/lib/lttng-ctl/destruction-handle.c
b/src/lib/lttng-ctl/destruction-handle.c
index aeeece7e316abad31884c5498667b1fb09f60f3c..26ae7d3065f863840143020cffe61e7e982e101e 100644
(file)
--- a/
src/lib/lttng-ctl/destruction-handle.c
+++ b/
src/lib/lttng-ctl/destruction-handle.c
@@
-59,7
+59,7
@@
void lttng_destruction_handle_destroy(struct lttng_destruction_handle *handle)
}
lttng_poll_clean(&handle->communication.events);
lttng_dynamic_buffer_reset(&handle->communication.buffer);
}
lttng_poll_clean(&handle->communication.events);
lttng_dynamic_buffer_reset(&handle->communication.buffer);
- lttng_trace_archive_location_
destroy
(handle->location);
+ lttng_trace_archive_location_
put
(handle->location);
free(handle);
}
free(handle);
}
@@
-101,7
+101,7
@@
int handle_state_transition(struct lttng_destruction_handle *handle)
{
int ret = 0;
{
int ret = 0;
-
assert
(handle->communication.bytes_left_to_receive == 0);
+
LTTNG_ASSERT
(handle->communication.bytes_left_to_receive == 0);
switch (handle->communication.state) {
case COMMUNICATION_STATE_RECEIVE_LTTNG_MSG:
switch (handle->communication.state) {
case COMMUNICATION_STATE_RECEIVE_LTTNG_MSG:
@@
-129,7
+129,7
@@
int handle_state_transition(struct lttng_destruction_handle *handle)
msg->data_size);
ret = lttng_dynamic_buffer_set_size(
&handle->communication.buffer, 0);
msg->data_size);
ret = lttng_dynamic_buffer_set_size(
&handle->communication.buffer, 0);
-
assert
(!ret);
+
LTTNG_ASSERT
(!ret);
break;
}
case COMMUNICATION_STATE_RECEIVE_COMMAND_HEADER:
break;
}
case COMMUNICATION_STATE_RECEIVE_COMMAND_HEADER:
@@
-173,6
+173,7
@@
int handle_state_transition(struct lttng_destruction_handle *handle)
ret = -1;
break;
} else {
ret = -1;
break;
} else {
+ /* Ownership is transferred to the destruction handle. */
handle->location = location;
handle->communication.state = COMMUNICATION_STATE_END;
}
handle->location = location;
handle->communication.state = COMMUNICATION_STATE_END;
}
@@
-227,7
+228,6
@@
enum lttng_destruction_handle_status
lttng_destruction_handle_wait_for_completion(
struct lttng_destruction_handle *handle, int timeout_ms)
{
lttng_destruction_handle_wait_for_completion(
struct lttng_destruction_handle *handle, int timeout_ms)
{
- int ret;
enum lttng_destruction_handle_status status;
unsigned long time_left_ms = 0;
const bool has_timeout = timeout_ms > 0;
enum lttng_destruction_handle_status status;
unsigned long time_left_ms = 0;
const bool has_timeout = timeout_ms > 0;
@@
-246,7
+246,7
@@
lttng_destruction_handle_wait_for_completion(
goto end;
}
if (has_timeout) {
goto end;
}
if (has_timeout) {
- ret = lttng_clock_gettime(CLOCK_MONOTONIC, &initial_time);
+
int
ret = lttng_clock_gettime(CLOCK_MONOTONIC, &initial_time);
if (ret) {
status = LTTNG_DESTRUCTION_HANDLE_STATUS_ERROR;
goto end;
if (ret) {
status = LTTNG_DESTRUCTION_HANDLE_STATUS_ERROR;
goto end;
This page took
0.027407 seconds
and
4
git commands to generate.