summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
authorvkalintiris <vasilis@netdata.cloud>2022-07-07 11:09:56 +0300
committerGitHub <noreply@github.com>2022-07-07 11:09:56 +0300
commita54fcb7d75655801b27ebc310320e505cadac85a (patch)
tree1170caeeeb05d2c2e372f18ae6d2986d49e2a180 /daemon
parent479842e40fc3ca17b848a7a279cdbddaec41b6dc (diff)
Fix two helgrind reports (#13325)
* Use atomics ops with host->rrdpush_sender_connected. * Use different storage unit for rrdim's updated and exposed fields. The bitfields would end up in the same byte and thus requiring explicit protection with mutexes.
Diffstat (limited to 'daemon')
-rw-r--r--daemon/analytics.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/analytics.c b/daemon/analytics.c
index 69f6fe4c2d..6090169446 100644
--- a/daemon/analytics.c
+++ b/daemon/analytics.c
@@ -382,7 +382,7 @@ void analytics_https(void)
BUFFER *b = buffer_create(30);
#ifdef ENABLE_HTTPS
analytics_exporting_connectors_ssl(b);
- buffer_strcat(b, netdata_client_ctx && localhost->ssl.flags == NETDATA_SSL_HANDSHAKE_COMPLETE && localhost->rrdpush_sender_connected == 1 ? "streaming|" : "|");
+ buffer_strcat(b, netdata_client_ctx && localhost->ssl.flags == NETDATA_SSL_HANDSHAKE_COMPLETE && __atomic_load_n(&localhost->rrdpush_sender_connected, __ATOMIC_SEQ_CST) ? "streaming|" : "|");
buffer_strcat(b, netdata_srv_ctx ? "web" : "");
#else
buffer_strcat(b, "||");