Skip to content
Snippets Groups Projects
Unverified Commit 2ef0af5f authored by lemoer's avatar lemoer Committed by Matthias Schiffer
Browse files

gluon-respondd: add system.domain_code to respondd provider "nodeinfo"

[Matthias Schiffer: rebase]
parent 8cb03884
No related branches found
No related tags found
No related merge requests found
...@@ -67,6 +67,10 @@ static struct json_object * get_site_code(void) { ...@@ -67,6 +67,10 @@ static struct json_object * get_site_code(void) {
return ret; return ret;
} }
static struct json_object * get_domain_code(void) {
return gluonutil_wrap_and_free_string(gluonutil_get_domain());
}
static struct json_object * get_hostname(void) { static struct json_object * get_hostname(void) {
struct json_object *ret = NULL; struct json_object *ret = NULL;
...@@ -123,6 +127,8 @@ static struct json_object * respondd_provider_nodeinfo(void) { ...@@ -123,6 +127,8 @@ static struct json_object * respondd_provider_nodeinfo(void) {
struct json_object *system = json_object_new_object(); struct json_object *system = json_object_new_object();
json_object_object_add(system, "site_code", get_site_code()); json_object_object_add(system, "site_code", get_site_code());
if (gluonutil_has_domains())
json_object_object_add(system, "domain_code", get_domain_code());
json_object_object_add(ret, "system", system); json_object_object_add(ret, "system", system);
return ret; return ret;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment