[libvirt] [PATCH] qemu: Do not require auth scheme in graphics events

Only VNC_{{DIS,}CONNECTED,INITIALIZED} and SPICE_INITIALIZED events are documented to support server/auth field and even there it is marked as optional. Emit "" auth scheme in case QEMU didn't send it. --- src/qemu/qemu_monitor_json.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 643431c..bab6ca2 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -685,8 +685,9 @@ static void qemuMonitorJSONHandleGraphics(qemuMonitorPtr mon, virJSONValuePtr da authScheme = virJSONValueObjectGetString(server, "auth"); if (!authScheme) { - VIR_WARN("missing auth scheme in graphics event"); - return; + /* not all events are required to contain auth scheme */ + VIR_DEBUG("missing auth scheme in graphics event"); + authScheme = ""; } localFamily = virJSONValueObjectGetString(server, "family"); -- 1.7.12

On 09/04/2012 09:03 AM, Jiri Denemark wrote:
Only VNC_{{DIS,}CONNECTED,INITIALIZED} and SPICE_INITIALIZED events are documented to support server/auth field and even there it is marked as optional. Emit "" auth scheme in case QEMU didn't send it. --- src/qemu/qemu_monitor_json.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
ACK. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Eric Blake
-
Jiri Denemark