]> git.ipfire.org Git - thirdparty/qemu.git/commit
qga: process_event() simplification
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 20 Feb 2019 15:42:52 +0000 (16:42 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 18 Mar 2019 15:48:06 +0000 (10:48 -0500)
commit781f2b3d1e5ef389b44016a897fd55e7a780bf35
tree3ebb46ee0a3fe9bef143492e3c45b26d4c1d25c3
parent996b9cdc2f190a173e48f4c8d64de3d50e570b7b
qga: process_event() simplification

Simplify the code around qmp_dispatch():
- rely on qmp_dispatch/check_obj() for message checking
- have a single send_response() point
- constify send_response() argument

It changes a couple of error messages:

* When @req isn't a dictionary, from
    Invalid JSON syntax
  to
    QMP input must be a JSON object

* When @req lacks member "execute", from
    this feature or command is not currently supported
  to
    QMP input lacks member 'execute'

CC: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
qga/main.c