Skip to content

Commit

Permalink
gluon-core: announce pretty domain name to respondd
Browse files Browse the repository at this point in the history
  • Loading branch information
lemoer committed Oct 18, 2017
1 parent 4936850 commit 8cc67ea
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions package/gluon-core/src/respondd.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,19 @@


static struct json_object * respondd_provider_nodeinfo(void) {
struct json_object *ret = json_object_new_object();
struct json_object *site = gluonutil_load_site_config();
if (!site)
return NULL;

struct json_object *domain_name = NULL;
json_object_object_get_ex(site, "domain_name", &domain_name);
if (domain_name)
json_object_get(domain_name);

char * domain_name = gluonutil_get_selected_domain(NULL);
json_object_put(site);

json_object_object_add(ret, "domain", gluonutil_wrap_and_free_string(domain_name));
struct json_object *ret = json_object_new_object();
json_object_object_add(ret, "domain_name", domain_name);

return ret;
}
Expand Down

0 comments on commit 8cc67ea

Please sign in to comment.