diff options
author | Markus Armbruster <armbru@redhat.com> | 2018-07-03 10:53:33 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2018-07-03 23:18:56 +0200 |
commit | 80cd93bd966bbb0907caa7f1d5676342f27f8f9e (patch) | |
tree | 34621689d680819983c4c8e7ebfd5a3c222db452 /monitor.c | |
parent | 2970b4461f5f0dd0798774618713aadd457e8d48 (diff) |
qmp: Make "id" optional again even in "oob" monitors
Commit cf869d53172 "qmp: support out-of-band (oob) execution" made
"id" mandatory for all commands when the client accepted capability
"oob". This is rather onerous when you play with QMP by hand, and
unnecessarily so: only out-of-band commands need an ID for reliable
matching of response to command.
Revert that part of commit cf869d53172 for now, but have documentation
advise on the need to use "id" with out-of-band commands.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180703085358.13941-8-armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 7 |
1 files changed, 0 insertions, 7 deletions
@@ -4292,13 +4292,6 @@ static void handle_qmp_command(JSONMessageParser *parser, GQueue *tokens) id = qdict_get(qdict, "id"); - /* When OOB is enabled, the "id" field is mandatory. */ - if (qmp_oob_enabled(mon) && !id) { - error_setg(&err, "Out-of-band capability requires that " - "every command contains an 'id' field"); - goto err; - } - req_obj = g_new0(QMPRequest, 1); req_obj->mon = mon; req_obj->id = qobject_ref(id); |