json-rpc-test-server: reject non-null params in "ping"
This commit is contained in:
		@@ -1449,7 +1449,10 @@ static json_t *
 | 
				
			|||||||
json_rpc_ping (struct server_context *ctx, json_t *params)
 | 
					json_rpc_ping (struct server_context *ctx, json_t *params)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	(void) ctx;
 | 
						(void) ctx;
 | 
				
			||||||
	(void) params;
 | 
					
 | 
				
			||||||
 | 
						if (params && !json_is_null (params))
 | 
				
			||||||
 | 
							return json_rpc_response (NULL, NULL,
 | 
				
			||||||
 | 
								json_rpc_error (JSON_RPC_ERROR_INVALID_PARAMS, NULL));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return json_rpc_response (NULL, json_string ("pong"), NULL);
 | 
						return json_rpc_response (NULL, json_string ("pong"), NULL);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user