Module: kamailio
Branch: master
Commit: d19719dd3cbaa577a7a66360843ae6679445f123
URL: 
https://github.com/kamailio/kamailio/commit/d19719dd3cbaa577a7a66360843ae6679445f123

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2015-09-15T13:20:02+02:00

htable.dump: add the type of the value to the result

---

Modified: modules/htable/htable.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/d19719dd3cbaa577a7a66360843ae6679445f123.diff
Patch: 
https://github.com/kamailio/kamailio/commit/d19719dd3cbaa577a7a66360843ae6679445f123.patch

---

diff --git a/modules/htable/htable.c b/modules/htable/htable.c
index 13ec1dd..c6e2250 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;


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to