Message ID | 1443189844-20341-27-git-send-email-marcandre.lureau@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index 83ecab5..73ba3ad 100644 --- a/qapi/qmp-dispatch.c +++ b/qapi/qmp-dispatch.c @@ -105,6 +105,11 @@ static QObject *do_qmp_dispatch(QObject *request, QmpReturn *qret, Error **errp) } break; case QCT_ASYNC: + if (!qdict_haskey(qret->rsp, "id")) { + error_setg(errp, "An async command requires an 'id'"); + break; + } + cmd->fn_async(args, qret); break; }