QMP: Enforce capability negotiation rules
commit09069b19f49311c772e220b44edb19fdd446ba5f
authorLuiz Capitulino <lcapitulino@redhat.com>
Thu, 4 Feb 2010 20:10:06 +0000 (4 18:10 -0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 10 Feb 2010 18:46:05 +0000 (10 12:46 -0600)
treed9625809ae19ffb958bbdf7575cd66e2ba1db535
parent4a7e1190dfadf1154721125af8510347f8a3c56b
QMP: Enforce capability negotiation rules

With this commit QMP will be started in Capabilities Negotiation
mode, where the only command allowed to run is 'qmp_capabilities'.

All other commands will return CommandNotFound error. Asynchronous
messages are not delivered either.

When 'qmp_capabilities' is successfully executed QMP enters in
Command mode, where all commands (except 'qmp_capabilities') are
allowed to run and asynchronous messages are delivered.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor.c