From d19719dd3cbaa577a7a66360843ae6679445f123 Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Tue, 15 Sep 2015 13:20:02 +0200 Subject: [PATCH] htable.dump: add the type of the value to the result --- modules/htable/htable.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/htable/htable.c b/modules/htable/htable.c index 13ec1dd1b1e..c6e225030da 100644 --- a/modules/htable/htable.c +++ b/modules/htable/htable.c @@ -990,17 +990,19 @@ static void htable_rpc_dump(rpc_t* rpc, void* c) goto error; } if(it->flags&AVP_VAL_STR) { - if(rpc->struct_add(vh, "SS", + if(rpc->struct_add(vh, "SSs", "name", &it->name.s, - "value", &it->value.s)<0) + "value", &it->value.s, + "type", "str")<0) { rpc->fault(c, 500, "Internal error adding item"); goto error; } } else { - if(rpc->struct_add(vh, "Sd", + if(rpc->struct_add(vh, "Sds", "name", &it->name.s, - "value", (int)it->value.n)<0) + "value", (int)it->value.n, + "type", "int")<0) { rpc->fault(c, 500, "Internal error adding item"); goto error;