Skip to content

Commit

Permalink
core: return aliases list as an array in core.aliases_list
Browse files Browse the repository at this point in the history
  • Loading branch information
grumvalski committed Jul 12, 2017
1 parent 38f5140 commit 13c84b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/core_cmd.c
Expand Up @@ -876,14 +876,16 @@ static const char* core_aliases_list_doc[] = {
static void core_aliases_list(rpc_t* rpc, void* c)
{
void *hr;
void *hs;
void *ha;
struct host_alias* a;

rpc->add(c, "{", &hr);
rpc->struct_add(hr, "s",
"myself_callbacks", is_check_self_func_list_set()?"yes":"no");
rpc->struct_add(hr, "[", "aliases", &hs);
for(a=aliases; a; a=a->next) {
rpc->struct_add(hr, "{", "alias", &ha);
rpc->struct_add(hs, "{", "alias", &ha);
rpc->struct_add(ha, "sS",
"proto", proto2a(a->proto),
"address", &a->alias
Expand Down

0 comments on commit 13c84b8

Please sign in to comment.