Statistics
| Branch: | Revision:

root / qapi / qmp-input-visitor.c @ 80465e80

History | View | Annotate | Download (7.8 kB)

# Date Author Comment
57a33d89 04/23/2012 07:03 pm NODA, Kai

qapi: g_hash_table_find() instead of GHashTableIter.

GHashTableIter was first introduced in glib 2.16.
This patch removes it in favor of older g_hash_table_find()
for better compatibility with RHEL5.

Signed-off-by: NODA, Kai <>
Signed-off-by: Luiz Capitulino <>

e38ac962 03/27/2012 03:15 pm Paolo Bonzini

qapi: add strict mode to input visitor

While QMP in general is designed so that it is possible to ignore
unknown arguments, in the case of the QMP server it is better to
reject them to detect bad clients. In fact, we're already doing
this at the top level in the argument checker. To extend this to...

4faaec6a 03/27/2012 03:15 pm Paolo Bonzini

qapi: place outermost object on qiv stack

This is a slight change in the implementation of QMPInputVisitor
that helps when adding strict mode.

Const QObjects cannot be inc/decref-ed, and that's why QMPInputVisitor
relies heavily on weak references to inner objects. I'm not removing...

3a86a0fa 03/27/2012 03:14 pm Paolo Bonzini

qapi: untangle next_list

Right now, the semantics of next_list are complicated. The caller must:

  • call start_list
  • call next_list for each element including the first
  • on the first call to next_list, the second argument should point to
    NULL and the result is the head of the list. On subsequent calls,...
8b714d37 03/27/2012 03:13 pm Paolo Bonzini

qapi: fix memory leak on error

QmpInputVisitor would leak the malloced struct if the stack was
overflowed. This can be easily fixed using error_propagate.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Anthony Liguori <>...

2c7ff933 03/27/2012 03:13 pm Paolo Bonzini

qapi: fail hard on stack imbalance

QmpOutputVisitor will segfault if an imbalanced end function is
called. So we can abort in QmpInputVisitor too.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Anthony Liguori <>
Signed-off-by: Luiz Capitulino <>

0f71a1e0 02/21/2012 11:21 am Paolo Bonzini

qapi: allow sharing enum implementation across visitors

Most visitors will use the same code for enum parsing. Move it to
the core.

Signed-off-by: Paolo Bonzini <>

9f9ab465 02/21/2012 11:21 am Paolo Bonzini

qapi: drop qmp_input_end_optional

This method is optional, do not implement it if it is empty.

Signed-off-by: Paolo Bonzini <>

47c6d3ec 12/19/2011 06:27 pm Paolo Bonzini

qapi: protect against NULL QObject in qmp_input_get_object

A NULL qobj can occur when a parameter is fetched via qdict_get, but
the parameter is not in the command. By returning NULL, the caller can
choose whether to raise a missing parameter error, an invalid parameter...

e1bc2f7b 10/04/2011 05:00 pm Michael Roth

qapi: modify visitor code generation for list iteration

Modify logic such that we never assign values to the list head argument
to progress through the list on subsequent iterations, instead rely only
on having our return value passed back in as an argument on the next...

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

c40cc0a0 07/21/2011 10:48 pm Michael Roth

qapi: add QMP input visitor

A type of Visiter class that is used to walk a qobject's
structure and assign each entry to the corresponding native C type.
Command marshaling function will use this to pull out QMP command
parameters recieved over the wire and pass them as native arguments...