diff options
Diffstat (limited to 'registry')
-rw-r--r-- | registry/README.md | 4 | ||||
-rw-r--r-- | registry/registry.h | 1 | ||||
-rw-r--r-- | registry/registry_person.c | 2 | ||||
-rw-r--r-- | registry/registry_url.c | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/registry/README.md b/registry/README.md index 589a77fd05..5a9a2b3bbc 100644 --- a/registry/README.md +++ b/registry/README.md @@ -36,11 +36,11 @@ The registry keeps track of 3 entities: For each netdata installation (each `machine_guid`) the registry keeps track of the different URLs it is accessed. -1. **persons**: i.e. the web browsers accessing the netdata installations (a random GUID generated by the registry the first time it sees a new web browser; we call this **person_guid**) +2. **persons**: i.e. the web browsers accessing the netdata installations (a random GUID generated by the registry the first time it sees a new web browser; we call this **person_guid**) For each person, the registry keeps track of the netdata installations it has accessed and their URLs. -1. **URLs** of netdata installations (as seen by the web browsers) +3. **URLs** of netdata installations (as seen by the web browsers) For each URL, the registry keeps the URL and nothing more. Each URL is linked to *persons* and *machines*. The only way to find a URL is to know its **machine_guid** or have a **person_guid** it is linked to it. diff --git a/registry/registry.h b/registry/registry.h index ab36de014f..ca74300e06 100644 --- a/registry/registry.h +++ b/registry/registry.h @@ -72,6 +72,7 @@ extern int registry_request_hello_json(RRDHOST *host, struct web_client *w); extern void registry_statistics(void); extern char *registry_get_this_machine_guid(void); +extern char *registry_get_mgmt_api_key(void); extern char *registry_get_this_machine_hostname(void); extern int regenerate_guid(const char *guid, char *result); diff --git a/registry/registry_person.c b/registry/registry_person.c index 53e3f47f42..268b0bd136 100644 --- a/registry/registry_person.c +++ b/registry/registry_person.c @@ -79,7 +79,7 @@ REGISTRY_PERSON_URL *registry_person_url_allocate(REGISTRY_PERSON *p, REGISTRY_M REGISTRY_PERSON_URL *tpu = registry_person_url_index_add(p, pu); if(tpu != pu) { error("Registry: Attempted to add duplicate person url '%s' with name '%s' to person '%s'", u->url, name, p->guid); - free(pu); + freez(pu); pu = tpu; } else diff --git a/registry/registry_url.c b/registry/registry_url.c index 6a71064588..9ac3ce10c5 100644 --- a/registry/registry_url.c +++ b/registry/registry_url.c @@ -51,7 +51,7 @@ REGISTRY_URL *registry_url_get(const char *url, size_t urllen) { n = registry_url_index_add(u); if(n != u) { error("INTERNAL ERROR: registry_url_get(): url '%s' already exists in the registry as '%s'", u->url, n->url); - free(u); + freez(u); u = n; } else |