From: Luiz Capitulino <lcapitulino@redhat.com>
To: anthony@codemonkey.ws
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 1/4] QMP: Fix default response regression
Date: Mon, 6 Dec 2010 12:43:48 -0200 [thread overview]
Message-ID: <1291646631-4609-2-git-send-email-lcapitulino@redhat.com> (raw)
In-Reply-To: <1291646631-4609-1-git-send-email-lcapitulino@redhat.com>
Commit 030db6e89d dropped do_info() usage from QMP and introduced
qmp_call_query_cmd(). However, the new function doesn't emit QMP's
default OK response when the handler doesn't return data.
Fix that by also calling monitor_protocol_emitter() when
ret_data == NULL, so that the default response is emitted.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
monitor.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/monitor.c b/monitor.c
index ec31eac..1296c40 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4464,10 +4464,8 @@ static void qmp_call_query_cmd(Monitor *mon, const mon_cmd_t *cmd)
}
} else {
cmd->mhandler.info_new(mon, &ret_data);
- if (ret_data) {
- monitor_protocol_emitter(mon, ret_data);
- qobject_decref(ret_data);
- }
+ monitor_protocol_emitter(mon, ret_data);
+ qobject_decref(ret_data);
}
}
--
1.7.3.3.398.g0b0cd
next prev parent reply other threads:[~2010-12-06 14:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-06 14:43 [Qemu-devel] [PULL 0/4]: Monitor queue Luiz Capitulino
2010-12-06 14:43 ` Luiz Capitulino [this message]
2010-12-06 14:43 ` [Qemu-devel] [PATCH 2/4] QMP: Drop dead code Luiz Capitulino
2010-12-06 14:43 ` [Qemu-devel] [PATCH 3/4] QMP: Simplify monitor_json_emitter() Luiz Capitulino
2010-12-06 14:43 ` [Qemu-devel] [PATCH 4/4] correct migrate_set_speed's args_type Luiz Capitulino
2010-12-17 14:48 ` [Qemu-devel] [PULL 0/4]: Monitor queue Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1291646631-4609-2-git-send-email-lcapitulino@redhat.com \
--to=lcapitulino@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).