diff options
Diffstat (limited to 'claim')
-rw-r--r-- | claim/claim.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/claim/claim.c b/claim/claim.c index c919fa3bdc..e68134d5d4 100644 --- a/claim/claim.c +++ b/claim/claim.c @@ -161,7 +161,9 @@ void load_claiming_state(void) freez(claimed_id); claimed_id = NULL; } - localhost->aclk_state.claimed_id = 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 +174,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 |