Browse Source

websocket: proper parameters for rpc response building of ws dump

- reported by GH #1022
Daniel-Constantin Mierla 8 years ago
parent
commit
679febf10e
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/modules/websocket/ws_conn.c

+ 3 - 3
src/modules/websocket/ws_conn.c

@@ -623,7 +623,7 @@ void ws_rpc_dump(rpc_t* rpc, void* ctx)
 		return;
 		return;
 	}
 	}
 	if(rpc->struct_add(th, "[{",
 	if(rpc->struct_add(th, "[{",
-				"connections",  "info", &ih, &dh)<0)
+				"connections", &ih,  "info", &dh)<0)
 	{
 	{
 		rpc->fault(ctx, 500, "Internal error connections structure");
 		rpc->fault(ctx, 500, "Internal error connections structure");
 		return;
 		return;
@@ -703,8 +703,8 @@ void ws_rpc_dump(rpc_t* rpc, void* ctx)
 	WSCONN_UNLOCK;
 	WSCONN_UNLOCK;
 
 
 	if(rpc->struct_add(dh, "ds",
 	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");
 		rpc->fault(ctx, 500, "Internal error adding info structure");
 		return;
 		return;