aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2018-07-03 10:53:33 +0200
committerMarkus Armbruster <armbru@redhat.com>2018-07-03 23:18:56 +0200
commit80cd93bd966bbb0907caa7f1d5676342f27f8f9e (patch)
tree34621689d680819983c4c8e7ebfd5a3c222db452 /monitor.c
parent2970b4461f5f0dd0798774618713aadd457e8d48 (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.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/monitor.c b/monitor.c
index 3ad89fe1ba..0dd6e22463 100644
--- a/monitor.c
+++ b/monitor.c
@@ -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);