json-rpc-test-server: reject non-null params in "ping"
This commit is contained in:
parent
20558ecd2b
commit
ee5317f865
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user