Message ID | 20170118160332.13390-9-marcandre.lureau@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index 26f0a674ae..d5c8670a4f 100644 --- a/qapi/qmp-dispatch.c +++ b/qapi/qmp-dispatch.c @@ -48,6 +48,8 @@ static QDict *qmp_dispatch_check_obj(const QObject *request, Error **errp) return NULL; } has_exec_key = true; + } else if (!strcmp(arg_name, "id")) { + /* top-level 'id' is accepted */ } else if (strcmp(arg_name, "arguments")) { error_setg(errp, QERR_QMP_EXTRA_MEMBER, arg_name); return NULL;
'id' is documented as part of qmp-spec, it is valid at top-level entry. The following patch copies the 'id' to the reply, without touching the original request (which should eventually be const later) so it must pass the check function without error. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> --- qapi/qmp-dispatch.c | 2 ++ 1 file changed, 2 insertions(+)