gluon-respondd: add system.domain_code to respondd provider "nodeinfo"
[Matthias Schiffer: rebase]
This commit is contained in:
parent
8cb0388416
commit
2ef0af5fe8
@ -67,6 +67,10 @@ static struct json_object * get_site_code(void) {
|
||||
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) {
|
||||
struct json_object *ret = NULL;
|
||||
|
||||
@ -123,6 +127,8 @@ static struct json_object * respondd_provider_nodeinfo(void) {
|
||||
|
||||
struct json_object *system = json_object_new_object();
|
||||
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);
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user