aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/interop/qmp-spec.txt13
-rw-r--r--monitor.c7
2 files changed, 7 insertions, 13 deletions
diff --git a/docs/interop/qmp-spec.txt b/docs/interop/qmp-spec.txt
index 6b72b69cb1..a1d6f9ee06 100644
--- a/docs/interop/qmp-spec.txt
+++ b/docs/interop/qmp-spec.txt
@@ -103,16 +103,13 @@ The format for command execution is:
required. Each command documents what contents will be considered
valid when handling the json-argument
- The "id" member is a transaction identification associated with the
- command execution. It is required for all commands if the OOB -
- capability was enabled at startup, and optional otherwise. The same
- "id" field will be part of the response if provided. The "id"
- member can be any json-value. A json-number incremented for each
- successive command works fine.
+ command execution, it is optional and will be part of the response
+ if provided. The "id" member can be any json-value. A json-number
+ incremented for each successive command works fine.
- The optional "control" member further specifies how the command is
to be executed. Currently, its only member is optional "run-oob".
See section "2.3.1 Out-of-band execution" for details.
-
2.3.1 Out-of-band execution
---------------------------
@@ -128,6 +125,10 @@ possibly overtaking prior in-band commands. The client may therefore
receive such a command's response before responses from prior in-band
commands.
+To be able to match responses back to their commands, the client needs
+to pass "id" with out-of-band commands. Passing it with all commands
+is recommended for clients that accept capability "oob".
+
To execute a command out-of-band, the client puts "run-oob": true into
execute's member "control".
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);