projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
configure: add '-Wlogical-op' to warning flags
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
main.cpp
diff --git
a/src/bin/lttng-relayd/main.cpp
b/src/bin/lttng-relayd/main.cpp
index d3f8b3c9e30234a98eed30f49831028a3f9a99bf..72bf30b7ec10589ce797b83af494bc6f7e782e78 100644
(file)
--- a/
src/bin/lttng-relayd/main.cpp
+++ b/
src/bin/lttng-relayd/main.cpp
@@
-49,6
+49,7
@@
#include <common/sessiond-comm/relayd.h>
#include <common/uri.h>
#include <common/utils.h>
#include <common/sessiond-comm/relayd.h>
#include <common/uri.h>
#include <common/utils.h>
+#include <common/path.h>
#include <common/align.h>
#include <common/ini-config/ini-config.h>
#include <common/dynamic-buffer.h>
#include <common/align.h>
#include <common/ini-config/ini-config.h>
#include <common/dynamic-buffer.h>
@@
-2663,7
+2664,10
@@
static int relay_rotate_session_streams(
*/
next_trace_chunk = sessiond_trace_chunk_registry_get_chunk(
sessiond_trace_chunk_registry,
*/
next_trace_chunk = sessiond_trace_chunk_registry_get_chunk(
sessiond_trace_chunk_registry,
- session->sessiond_uuid, session->id,
+ session->sessiond_uuid,
+ conn->session->id_sessiond.is_set ?
+ conn->session->id_sessiond.value :
+ conn->session->id,
rotate_streams.new_chunk_id.value);
if (!next_trace_chunk) {
char uuid_str[LTTNG_UUID_STR_LEN];
rotate_streams.new_chunk_id.value);
if (!next_trace_chunk) {
char uuid_str[LTTNG_UUID_STR_LEN];
@@
-2885,7
+2889,9
@@
static int relay_create_trace_chunk(const struct lttcomm_relayd_hdr *recv_hdr,
published_chunk = sessiond_trace_chunk_registry_publish_chunk(
sessiond_trace_chunk_registry,
conn->session->sessiond_uuid,
published_chunk = sessiond_trace_chunk_registry_publish_chunk(
sessiond_trace_chunk_registry,
conn->session->sessiond_uuid,
- conn->session->id,
+ conn->session->id_sessiond.is_set ?
+ conn->session->id_sessiond.value :
+ conn->session->id,
chunk);
if (!published_chunk) {
char uuid_str[LTTNG_UUID_STR_LEN];
chunk);
if (!published_chunk) {
char uuid_str[LTTNG_UUID_STR_LEN];
@@
-2991,7
+2997,9
@@
static int relay_close_trace_chunk(const struct lttcomm_relayd_hdr *recv_hdr,
chunk = sessiond_trace_chunk_registry_get_chunk(
sessiond_trace_chunk_registry,
conn->session->sessiond_uuid,
chunk = sessiond_trace_chunk_registry_get_chunk(
sessiond_trace_chunk_registry,
conn->session->sessiond_uuid,
- conn->session->id,
+ conn->session->id_sessiond.is_set ?
+ conn->session->id_sessiond.value :
+ conn->session->id,
chunk_id);
if (!chunk) {
char uuid_str[LTTNG_UUID_STR_LEN];
chunk_id);
if (!chunk) {
char uuid_str[LTTNG_UUID_STR_LEN];
@@
-3397,7
+3405,10
@@
static enum relay_connection_status relay_process_control_receive_payload(
reception_buffer->data + state->received,
state->left_to_receive, MSG_DONTWAIT);
if (ret < 0) {
reception_buffer->data + state->received,
state->left_to_receive, MSG_DONTWAIT);
if (ret < 0) {
+ DIAGNOSTIC_PUSH
+ DIAGNOSTIC_IGNORE_LOGICAL_OP
if (errno != EAGAIN && errno != EWOULDBLOCK) {
if (errno != EAGAIN && errno != EWOULDBLOCK) {
+ DIAGNOSTIC_POP
PERROR("Unable to receive command payload on sock %d",
conn->sock->fd);
status = RELAY_CONNECTION_STATUS_ERROR;
PERROR("Unable to receive command payload on sock %d",
conn->sock->fd);
status = RELAY_CONNECTION_STATUS_ERROR;
@@
-3470,7
+3481,10
@@
static enum relay_connection_status relay_process_control_receive_header(
reception_buffer->data + state->received,
state->left_to_receive, MSG_DONTWAIT);
if (ret < 0) {
reception_buffer->data + state->received,
state->left_to_receive, MSG_DONTWAIT);
if (ret < 0) {
+ DIAGNOSTIC_PUSH
+ DIAGNOSTIC_IGNORE_LOGICAL_OP
if (errno != EAGAIN && errno != EWOULDBLOCK) {
if (errno != EAGAIN && errno != EWOULDBLOCK) {
+ DIAGNOSTIC_POP
PERROR("Unable to receive control command header on sock %d",
conn->sock->fd);
status = RELAY_CONNECTION_STATUS_ERROR;
PERROR("Unable to receive control command header on sock %d",
conn->sock->fd);
status = RELAY_CONNECTION_STATUS_ERROR;
@@
-3581,7
+3595,10
@@
static enum relay_connection_status relay_process_data_receive_header(
state->header_reception_buffer + state->received,
state->left_to_receive, MSG_DONTWAIT);
if (ret < 0) {
state->header_reception_buffer + state->received,
state->left_to_receive, MSG_DONTWAIT);
if (ret < 0) {
+ DIAGNOSTIC_PUSH
+ DIAGNOSTIC_IGNORE_LOGICAL_OP
if (errno != EAGAIN && errno != EWOULDBLOCK) {
if (errno != EAGAIN && errno != EWOULDBLOCK) {
+ DIAGNOSTIC_POP
PERROR("Unable to receive data header on sock %d", conn->sock->fd);
status = RELAY_CONNECTION_STATUS_ERROR;
}
PERROR("Unable to receive data header on sock %d", conn->sock->fd);
status = RELAY_CONNECTION_STATUS_ERROR;
}
@@
-3708,7
+3725,10
@@
static enum relay_connection_status relay_process_data_receive_payload(
ret = conn->sock->ops->recvmsg(conn->sock, data_buffer,
recv_size, MSG_DONTWAIT);
if (ret < 0) {
ret = conn->sock->ops->recvmsg(conn->sock, data_buffer,
recv_size, MSG_DONTWAIT);
if (ret < 0) {
+ DIAGNOSTIC_PUSH
+ DIAGNOSTIC_IGNORE_LOGICAL_OP
if (errno != EAGAIN && errno != EWOULDBLOCK) {
if (errno != EAGAIN && errno != EWOULDBLOCK) {
+ DIAGNOSTIC_POP
PERROR("Socket %d error", conn->sock->fd);
status = RELAY_CONNECTION_STATUS_ERROR;
}
PERROR("Socket %d error", conn->sock->fd);
status = RELAY_CONNECTION_STATUS_ERROR;
}
This page took
0.024622 seconds
and
4
git commands to generate.