projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: partial recv lead to client disconnect
[lttng-tools.git]
/
src
/
common
/
actions
/
snapshot-session.c
diff --git
a/src/common/actions/snapshot-session.c
b/src/common/actions/snapshot-session.c
index 9e8e43577492b3f4d5bd0f3610fb529d7c37299a..058179633db411d6e29c42fc52c59af24b13fc94 100644
(file)
--- a/
src/common/actions/snapshot-session.c
+++ b/
src/common/actions/snapshot-session.c
@@
-124,16
+124,9
@@
end:
return is_equal;
}
return is_equal;
}
-static size_t serialize_strlen(const char *s)
+static size_t serialize_strlen(const char *s
tr
)
{
{
-
- size_t len = 0;
-
- if (s) {
- len = strlen(s) + 1;
- }
-
- return len;
+ return str ? strlen(str) + 1 : 0;
}
static int lttng_action_snapshot_session_serialize(
}
static int lttng_action_snapshot_session_serialize(
@@
-258,7
+251,7
@@
ssize_t lttng_action_snapshot_session_create_from_payload(
comm->snapshot_output_len);
if (!snapshot_output_buffer_view.buffer.data) {
comm->snapshot_output_len);
if (!snapshot_output_buffer_view.buffer.data) {
-
fprintf(stderr, "Failed to create buffer view for snapshot output.\n
");
+
ERR("Failed to create buffer view for snapshot output.
");
goto error;
}
goto error;
}
@@
-267,8
+260,7
@@
ssize_t lttng_action_snapshot_session_create_from_payload(
&snapshot_output_buffer_view,
&snapshot_output);
if (snapshot_output_consumed_len != comm->snapshot_output_len) {
&snapshot_output_buffer_view,
&snapshot_output);
if (snapshot_output_consumed_len != comm->snapshot_output_len) {
- fprintf(stderr,
- "Failed to deserialize snapshot output object: "
+ ERR("Failed to deserialize snapshot output object: "
"consumed-len: %zd, expected-len: %" PRIu32,
snapshot_output_consumed_len,
comm->snapshot_output_len);
"consumed-len: %zd, expected-len: %" PRIu32,
snapshot_output_consumed_len,
comm->snapshot_output_len);
This page took
0.030064 seconds
and
5
git commands to generate.