summaryrefslogtreecommitdiffstats
path: root/streaming/receiver.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-05-19 12:33:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-05-19 12:33:27 +0000
commit841395dd16f470e3c051a0a4fff5b91efc983c30 (patch)
tree4115f6eedcddda75067130b80acaff9e51612f49 /streaming/receiver.c
parentAdding upstream version 1.30.1. (diff)
downloadnetdata-841395dd16f470e3c051a0a4fff5b91efc983c30.tar.xz
netdata-841395dd16f470e3c051a0a4fff5b91efc983c30.zip
Adding upstream version 1.31.0.upstream/1.31.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'streaming/receiver.c')
-rw-r--r--streaming/receiver.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/streaming/receiver.c b/streaming/receiver.c
index 03954064a..11191f3c7 100644
--- a/streaming/receiver.c
+++ b/streaming/receiver.c
@@ -30,7 +30,7 @@ static void rrdpush_receiver_thread_cleanup(void *ptr) {
executed = 1;
struct receiver_state *rpt = (struct receiver_state *) ptr;
// If the shutdown sequence has started, and this receiver is still attached to the host then we cannot touch
- // the host pointer as it is unpredicable when the RRDHOST is deleted. Do the cleanup from rrdhost_free().
+ // the host pointer as it is unpredictable when the RRDHOST is deleted. Do the cleanup from rrdhost_free().
if (netdata_exit && rpt->host) {
rpt->exited = 1;
return;
@@ -123,13 +123,16 @@ PARSER_RC streaming_claimed_id(char **words, void *user, PLUGINSD_ACTION *plugin
if(strcmp(words[1], host->machine_guid)) {
error("Claim ID is for host \"%s\" but it came over connection for \"%s\"", words[1], host->machine_guid);
- return PARSER_RC_OK; //the message is OK problem must be somewehere else
+ return PARSER_RC_OK; //the message is OK problem must be somewhere else
}
rrdhost_aclk_state_lock(host);
if (host->aclk_state.claimed_id)
freez(host->aclk_state.claimed_id);
host->aclk_state.claimed_id = strcmp(words[2], "NULL") ? strdupz(words[2]) : NULL;
+
+ store_claim_id(&host->host_uuid, host->aclk_state.claimed_id ? &uuid : NULL);
+
rrdhost_aclk_state_unlock(host);
rrdpush_claimed_id(host);