diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-04-14 18:12:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-04-14 18:12:14 +0000 |
commit | bb50acdcb8073654ea667b8c0272e335bd43f844 (patch) | |
tree | 1e00c8a29871426f8182658928dcb62e42d57ce8 /claim/claim.c | |
parent | Releasing debian version 1.33.1-1. (diff) | |
download | netdata-bb50acdcb8073654ea667b8c0272e335bd43f844.tar.xz netdata-bb50acdcb8073654ea667b8c0272e335bd43f844.zip |
Merging upstream version 1.34.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'claim/claim.c')
-rw-r--r-- | claim/claim.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/claim/claim.c b/claim/claim.c index c919fa3bd..9c7e97e9e 100644 --- a/claim/claim.c +++ b/claim/claim.c @@ -161,7 +161,11 @@ void load_claiming_state(void) freez(claimed_id); claimed_id = NULL; } - localhost->aclk_state.claimed_id = claimed_id; + + if(claimed_id) { + localhost->aclk_state.claimed_id = mallocz(UUID_STR_LEN); + uuid_unparse_lower(uuid, localhost->aclk_state.claimed_id); + } invalidate_node_instances(&localhost->host_uuid, claimed_id ? &uuid : NULL); store_claim_id(&localhost->host_uuid, claimed_id ? &uuid : NULL); @@ -172,6 +176,8 @@ void load_claiming_state(void) return; } + freez(claimed_id); + info("File '%s' was found. Setting state to AGENT_CLAIMED.", filename); netdata_cloud_setting = appconfig_get_boolean(&cloud_config, CONFIG_SECTION_GLOBAL, "enabled", 1); #endif |