diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-03-22 12:51:10 +0100 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2012-03-27 09:15:13 -0300 |
commit | e38ac9621c8ab51880b9e6e833a125342d6b46b2 (patch) | |
tree | 9221097ab672970e8929da9827f9a34ecb02a1e2 /qapi/qmp-input-visitor.h | |
parent | 4faaec6acf7f18b39c362edb9f6aa5658aab8b85 (diff) |
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
complex structures, add a mode to the input visitor where it checks
for unvisited keys and raises an error if it finds one.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'qapi/qmp-input-visitor.h')
-rw-r--r-- | qapi/qmp-input-visitor.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qapi/qmp-input-visitor.h b/qapi/qmp-input-visitor.h index 3f798f0335..e0a48a5f3b 100644 --- a/qapi/qmp-input-visitor.h +++ b/qapi/qmp-input-visitor.h @@ -20,6 +20,8 @@ typedef struct QmpInputVisitor QmpInputVisitor; QmpInputVisitor *qmp_input_visitor_new(QObject *obj); +QmpInputVisitor *qmp_input_visitor_new_strict(QObject *obj); + void qmp_input_visitor_cleanup(QmpInputVisitor *v); Visitor *qmp_input_get_visitor(QmpInputVisitor *v); |