summaryrefslogtreecommitdiff
path: root/json-rpc-test-server.c
diff options
context:
space:
mode:
Diffstat (limited to 'json-rpc-test-server.c')
-rw-r--r--json-rpc-test-server.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/json-rpc-test-server.c b/json-rpc-test-server.c
index 8c51ac4..564c1a7 100644
--- a/json-rpc-test-server.c
+++ b/json-rpc-test-server.c
@@ -1449,7 +1449,10 @@ static json_t *
json_rpc_ping (struct server_context *ctx, json_t *params)
{
(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);
}