Module: kamailio Branch: master Commit: 0956257ae6fdc0a801ce109017089ac18018e63b URL: https://github.com/kamailio/kamailio/commit/0956257ae6fdc0a801ce109017089ac18018e63b
Author: Daniel-Constantin Mierla <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2017-11-03T18:10:22+01:00 htable: fix rpc dump json format - slot items have to be inside an array --- Modified: src/modules/htable/htable.c --- Diff: https://github.com/kamailio/kamailio/commit/0956257ae6fdc0a801ce109017089ac18018e63b.diff Patch: https://github.com/kamailio/kamailio/commit/0956257ae6fdc0a801ce109017089ac18018e63b.patch --- diff --git a/src/modules/htable/htable.c b/src/modules/htable/htable.c index bce82e96bb..d14f914896 100644 --- a/src/modules/htable/htable.c +++ b/src/modules/htable/htable.c @@ -966,7 +966,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) @@ -976,8 +976,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; _______________________________________________ Kamailio (SER) - Development Mailing List [email protected] https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
