* [Qemu-devel] [STABLE 0.12] QMP: Drop wrong assert()
@ 2009-12-22 3:09 Luiz Capitulino
2009-12-22 7:50 ` Markus Armbruster
2010-01-08 16:34 ` Anthony Liguori
0 siblings, 2 replies; 3+ messages in thread
From: Luiz Capitulino @ 2009-12-22 3:09 UTC (permalink / raw)
To: qemu-devel; +Cc: nathan, aliguori
Some commands return a QList of QDicts, which is valid,
but will trig the assert().
Just drop it.
Reported-by: Nathan Baum <nathan@parenthephobia.org.uk>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
monitor.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/monitor.c b/monitor.c
index c0dc48e..3af1d5c 100644
--- a/monitor.c
+++ b/monitor.c
@@ -283,7 +283,6 @@ 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 {
--
1.6.6.rc3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [STABLE 0.12] QMP: Drop wrong assert()
2009-12-22 3:09 [Qemu-devel] [STABLE 0.12] QMP: Drop wrong assert() Luiz Capitulino
@ 2009-12-22 7:50 ` Markus Armbruster
2010-01-08 16:34 ` Anthony Liguori
1 sibling, 0 replies; 3+ messages in thread
From: Markus Armbruster @ 2009-12-22 7:50 UTC (permalink / raw)
To: Luiz Capitulino; +Cc: nathan, aliguori, qemu-devel
Luiz Capitulino <lcapitulino@redhat.com> writes:
> Some commands return a QList of QDicts, which is valid,
> but will trig the assert().
>
> Just drop it.
>
> Reported-by: Nathan Baum <nathan@parenthephobia.org.uk>
> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
> ---
> monitor.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/monitor.c b/monitor.c
> index c0dc48e..3af1d5c 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -283,7 +283,6 @@ 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 {
Yes, let's drop the assertion for now.
qmp-spec.txt specifies "json-object", so it needs fixing as well.
I figure what we want is either a dictionary (json-object), or a list of
dictionaries (json-array of json-object).
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [STABLE 0.12] QMP: Drop wrong assert()
2009-12-22 3:09 [Qemu-devel] [STABLE 0.12] QMP: Drop wrong assert() Luiz Capitulino
2009-12-22 7:50 ` Markus Armbruster
@ 2010-01-08 16:34 ` Anthony Liguori
1 sibling, 0 replies; 3+ messages in thread
From: Anthony Liguori @ 2010-01-08 16:34 UTC (permalink / raw)
To: Luiz Capitulino; +Cc: nathan, aliguori, qemu-devel
On 12/21/2009 09:09 PM, Luiz Capitulino wrote:
> Some commands return a QList of QDicts, which is valid,
> but will trig the assert().
>
> Just drop it.
>
> Reported-by: Nathan Baum<nathan@parenthephobia.org.uk>
> Signed-off-by: Luiz Capitulino<lcapitulino@redhat.com>
>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
> monitor.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/monitor.c b/monitor.c
> index c0dc48e..3af1d5c 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -283,7 +283,6 @@ 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 {
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-01-08 16:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-22 3:09 [Qemu-devel] [STABLE 0.12] QMP: Drop wrong assert() Luiz Capitulino
2009-12-22 7:50 ` Markus Armbruster
2010-01-08 16:34 ` Anthony Liguori
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).