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

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2017-03-08T12:31:26+01:00

websocket: proper parameters for rpc response building of ws dump

- reported by GH #1022

---

Modified: src/modules/websocket/ws_conn.c

---

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

---

diff --git a/src/modules/websocket/ws_conn.c b/src/modules/websocket/ws_conn.c
index 900847b..8b0dc84 100644
--- a/src/modules/websocket/ws_conn.c
+++ b/src/modules/websocket/ws_conn.c
@@ -623,7 +623,7 @@ void ws_rpc_dump(rpc_t* rpc, void* ctx)
                return;
        }
        if(rpc->struct_add(th, "[{",
-                               "connections",  "info", &ih, &dh)<0)
+                               "connections", &ih,  "info", &dh)<0)
        {
                rpc->fault(ctx, 500, "Internal error connections structure");
                return;
@@ -703,8 +703,8 @@ void ws_rpc_dump(rpc_t* rpc, void* ctx)
        WSCONN_UNLOCK;
 
        if(rpc->struct_add(dh, "ds",
-                               "wscounter", "truncated",
-                               connections, (truncated==1)?"yes":"no")<0)
+                               "wscounter", connections,
+                               "truncated", (truncated==1)?"yes":"no")<0)
        {
                rpc->fault(ctx, 500, "Internal error adding info structure");
                return;


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to