|
From: | Eric Blake |
Subject: | Re: [Qemu-devel] [PATCH v8 06/23] monitor: move the cur_mon hack deeper for QMP |
Date: | Sat, 10 Mar 2018 17:13:10 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 03/09/2018 02:59 AM, Peter Xu wrote:
In monitor_qmp_read(), we have the hack to temporarily replace the cur_mon pointer. Now we move this hack deeper inside the QMP dispatcher routine since the Monitor pointer can be actually obtained using container_of() upon the parser object, just like most of the other JSON parser users do. This does not make much sense as a single patch. However, this will be a big step for the next patch, when the QMP dispatcher routine will be split from the QMP parser. Reviewed-by: Stefan Hajnoczi <address@hidden> Reviewed-by: Eric Blake <address@hidden> Signed-off-by: Peter Xu <address@hidden> --- monitor.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
+ cur_mon = old_mon;+ if (mon->qmp.commands == &qmp_cap_negotiation_commands) { qdict = qdict_get_qdict(qobject_to_qdict(rsp), "error");
More conflict fun with the qobject_to() series. Sadly, 'git am -3' had a tough time, even though the conflict was only in the context, but I managed to get it all sorted out.
-- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |