[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]