[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/7] QMP: Assure that returned data is a QDict
From: |
Nathan Baum |
Subject: |
Re: [Qemu-devel] [PATCH 3/7] QMP: Assure that returned data is a QDict |
Date: |
Mon, 21 Dec 2009 19:21:18 +0000 |
On Fri, 2009-12-18 at 13:25 -0200, Luiz Capitulino wrote:
> This is for debug purposes only.
This breaks quite a lot of commands where the returned data is a QList,
e.g. query-commands, query-mice, query-cpus. Is the assert wrong, or are
such commands meant to be returning a QDict?
> Signed-off-by: Luiz Capitulino <address@hidden>
> ---
> monitor.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/monitor.c b/monitor.c
> index d238660..8ef1582 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -283,6 +283,7 @@ static void monitor_protocol_emitter(Monitor *mon,
> QObject *data)
> if (!monitor_has_error(mon)) {
> /* success response */
> if (data) {
> + assert(qobject_type(data) == QTYPE_QDICT);
> qobject_incref(data);
> qdict_put_obj(qmp, "return", data);
> } else {
- [Qemu-devel] [FOR 0.12 0/7]: More QMP related fixes, Luiz Capitulino, 2009/12/18
- [Qemu-devel] [PATCH 1/7] QMP: Only handle converted commands, Luiz Capitulino, 2009/12/18
- [Qemu-devel] [PATCH 2/7] QMP: Return an empty dict by default, Luiz Capitulino, 2009/12/18
- [Qemu-devel] [PATCH 3/7] QMP: Assure that returned data is a QDict, Luiz Capitulino, 2009/12/18
- Re: [Qemu-devel] [PATCH 3/7] QMP: Assure that returned data is a QDict,
Nathan Baum <=
- [Qemu-devel] [PATCH 4/7] QMP: Update README file, Luiz Capitulino, 2009/12/18
- [Qemu-devel] [PATCH 5/7] QMP: Update spec file, Luiz Capitulino, 2009/12/18
- Re: [Qemu-devel] [PATCH 5/7] QMP: Update spec file, Luiz Capitulino, 2009/12/18
- Re: [Qemu-devel] [PATCH 5/7] QMP: Update spec file, Markus Armbruster, 2009/12/18