Commit da7673f7 authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Jim Harris
Browse files

jsonrpc: make "jsonrpc" actually optional



The decoder was still marked as required, so omitting "jsonrpc" version
from the request did not work.

Change-Id: Ied6a8bb1fbbf072c5eff87ed0b343edd7b3702b3
Fixes: aa67900a ("jsonrpc: make "jsonrpc" request field optional")
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/412859


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 1e481d04
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ capture_val(const struct spdk_json_val *val, void *out)
}

static const struct spdk_json_object_decoder jsonrpc_request_decoders[] = {
	{"jsonrpc", offsetof(struct jsonrpc_request, version), capture_val},
	{"jsonrpc", offsetof(struct jsonrpc_request, version), capture_val, true},
	{"method", offsetof(struct jsonrpc_request, method), capture_val},
	{"params", offsetof(struct jsonrpc_request, params), capture_val, true},
	{"id", offsetof(struct jsonrpc_request, id), capture_val, true},