Skip to content

Commit

Permalink
htable: fix rpc dump json format
Browse files Browse the repository at this point in the history
- slot items have to be inside an array

(cherry picked from commit 0956257)
  • Loading branch information
miconda committed Nov 3, 2017
1 parent 6f9f851 commit 1dfe6bd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/modules/htable/htable.c
Expand Up @@ -856,7 +856,7 @@ static void htable_rpc_dump(rpc_t* rpc, void* c)
rpc->fault(c, 500, "Internal error creating rpc");
goto error;
}
if(rpc->struct_add(th, "dd{",
if(rpc->struct_add(th, "dd[",
"entry", i,
"size", (int)ht->entries[i].esize,
"slot", &ih)<0)
Expand All @@ -866,8 +866,7 @@ static void htable_rpc_dump(rpc_t* rpc, void* c)
}
while(it)
{
if(rpc->struct_add(ih, "{",
"item", &vh)<0)
if(rpc->array_add(ih, "{", &vh)<0)
{
rpc->fault(c, 500, "Internal error creating rpc");
goto error;
Expand Down

0 comments on commit 1dfe6bd

Please sign in to comment.