projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
relayd: clean-up: strncpy uses the length of the source as length
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
main.c
diff --git
a/src/bin/lttng-relayd/main.c
b/src/bin/lttng-relayd/main.c
index 2ffa75078779b7d0b9986696f5643267ca5ea7aa..0cd163fe85eae4028ce025c0cd1a5d35b5361132 100644
(file)
--- a/
src/bin/lttng-relayd/main.c
+++ b/
src/bin/lttng-relayd/main.c
@@
-2282,6
+2282,7
@@
static int relay_rotate_session_streams(
}
reply_code = LTTNG_OK;
}
reply_code = LTTNG_OK;
+ ret = 0;
end:
if (stream) {
stream_put(stream);
end:
if (stream) {
stream_put(stream);
@@
-2295,8
+2296,6
@@
end:
send_ret);
ret = -1;
}
send_ret);
ret = -1;
}
-
- ret = 0;
end_no_reply:
lttng_trace_chunk_put(next_trace_chunk);
return ret;
end_no_reply:
lttng_trace_chunk_put(next_trace_chunk);
return ret;
@@
-2469,7
+2468,7
@@
static int relay_close_trace_chunk(const struct lttcomm_relayd_hdr *recv_hdr,
struct relay_connection *conn,
const struct lttng_buffer_view *payload)
{
struct relay_connection *conn,
const struct lttng_buffer_view *payload)
{
- int ret = 0;
+ int ret = 0
, buf_ret
;
ssize_t send_ret;
struct relay_session *session = conn->session;
struct lttcomm_relayd_close_trace_chunk *msg;
ssize_t send_ret;
struct relay_session *session = conn->session;
struct lttcomm_relayd_close_trace_chunk *msg;
@@
-2630,17
+2629,17
@@
end_unlock_session:
end:
reply.generic.ret_code = htobe32((uint32_t) reply_code);
reply.path_length = htobe32((uint32_t) path_length);
end:
reply.generic.ret_code = htobe32((uint32_t) reply_code);
reply.path_length = htobe32((uint32_t) path_length);
- ret = lttng_dynamic_buffer_append(
+
buf_
ret = lttng_dynamic_buffer_append(
&reply_payload, &reply, sizeof(reply));
&reply_payload, &reply, sizeof(reply));
- if (ret) {
+ if (
buf_
ret) {
ERR("Failed to append \"close trace chunk\" command reply header to payload buffer");
goto end_no_reply;
}
if (reply_code == LTTNG_OK) {
ERR("Failed to append \"close trace chunk\" command reply header to payload buffer");
goto end_no_reply;
}
if (reply_code == LTTNG_OK) {
- ret = lttng_dynamic_buffer_append(&reply_payload,
+
buf_
ret = lttng_dynamic_buffer_append(&reply_payload,
closed_trace_chunk_path, path_length);
closed_trace_chunk_path, path_length);
- if (ret) {
+ if (
buf_
ret) {
ERR("Failed to append \"close trace chunk\" command reply path to payload buffer");
goto end_no_reply;
}
ERR("Failed to append \"close trace chunk\" command reply path to payload buffer");
goto end_no_reply;
}
This page took
0.02938 seconds
and
4
git commands to generate.