Commit b4df015a authored by William Pitcock's avatar William Pitcock

main/xen: add general robustness patch for qemu's vnc

parent 5066b116
......@@ -3,7 +3,7 @@
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=xen
pkgver=4.3.0
pkgrel=4
pkgrel=5
pkgdesc="Xen hypervisor"
url="http://www.xen.org/"
arch="x86_64"
......@@ -31,6 +31,7 @@ source="http://bits.xensource.com/oss-xen/release/$pkgver/$pkgname-$pkgver.tar.g
qemu-xen-tls-websockets.patch
qemu-coroutine-gthread.patch
qemu-xen-websocket-plain-hack.patch
qemu-xen-vnc-robustness.patch
hotplug-vif-vtrill.patch
......@@ -195,6 +196,7 @@ a4097e06a7e000ed00f4607db014d277 qemu-xen-websocket.patch
35bdea1d4e3ae2565edc7e40906efdd5 qemu-xen-tls-websockets.patch
9cf9b155dfa6cd473554aa0f25181c1c qemu-coroutine-gthread.patch
f8ea5786b0a6157b9cb3e67e323b592c qemu-xen-websocket-plain-hack.patch
066acc4af962c57e2f6cc0286bfdc270 qemu-xen-vnc-robustness.patch
e449bb3359b490804ffc7b0ae08d62a0 hotplug-vif-vtrill.patch
a90c36642f0701a8aaa4ebe4dde430f5 xenstored.initd
b017ccdd5e1c27bbf1513e3569d4ff07 xenstored.confd
......@@ -220,6 +222,7 @@ e9f6c482fc449e0b540657a8988ad31f2e680b8933e50e6486687a52f6a9ed04 qemu-xen-webso
435dd428d83acdfde58888532a1cece1e9075b2a2460fe3f6cd33c7d400f2715 qemu-xen-tls-websockets.patch
7477c5acfc756f6498858e4a3eb250b3db84ee491a9d4ae38dddbc27275a370c qemu-coroutine-gthread.patch
6c4c184462d47e7fd00e8d8f6bf12b33f6cf486f00415c1934ecf6c2b62f69c1 qemu-xen-websocket-plain-hack.patch
f34590761b627d69d2033c1350f2403e9d572b2172e852e3b30e7630bc009a9f qemu-xen-vnc-robustness.patch
dd1e784bc455eb62cb85b3fa24bfc34f575ceaab9597ef6a2f1ee7ff7b3cae0a hotplug-vif-vtrill.patch
868c77d689ae54b7041da169bfaa01868503337d4105a071eb771f4ec5a0543d xenstored.initd
ea9171e71ab3d33061979bcf3bb737156192aa4b0be4d1234438ced75b6fdef3 xenstored.confd
......@@ -245,6 +248,7 @@ bda9105793f2327e1317991762120d0668af0e964076b18c9fdbfd509984b2e88d85df95702c46b2
11eaccc346440ff285552f204d491e3b31bda1665c3219ecae3061b5d55db9dec885af0c031fa19c67e87bbe238002b1911bbd5bfea2f2ba0d61e6b3d0c952c9 qemu-xen-tls-websockets.patch
8b8df4f57ab725f54cfe44fb6b8d271ee22e94873f168e452293dd53955854b171b8311209133e5d825f9ce985219818803182b3451708a3452bc699b7b1dda1 qemu-coroutine-gthread.patch
692e29205fa3d0a6e4d1be69a242d55c44a1fee26c594e6e46d8809339f93dcdc31c0735723a46f63ae0a727741bdc8a899bb1ce9103a2cd701b236f63a17fa2 qemu-xen-websocket-plain-hack.patch
a52aa303dd3d9abae3ddb3af788b1f1f7a6bd9eb0c13f67f0995190238f7638f7909ea7d7bf7d778c64edbb6bdae87a5d5654e12440abded083e4818ff204b47 qemu-xen-vnc-robustness.patch
f095ea373f36381491ad36f0662fb4f53665031973721256b23166e596318581da7cbb0146d0beb2446729adfdb321e01468e377793f6563a67d68b8b0f7ffe3 hotplug-vif-vtrill.patch
880584e0866b1efcf3b7a934f07072ec84c13c782e3e7a15848d38ba8af50259d46db037dca1e037b15274989f2c22acd1134954dd60c59f4ee693b417d03e0d xenstored.initd
100cf4112f401f45c1e4e885a5074698c484b40521262f6268fad286498e95f4c51e746f0e94eb43a590bb8e813a397bb53801ccacebec9541020799d8d70514 xenstored.confd
......
--- xen-4.3.0.orig/tools/qemu-xen/ui/vnc.c
+++ xen-4.3.0/tools/qemu-xen/ui/vnc.c
@@ -2703,6 +2703,8 @@
vs->csock = csock;
+ QTAILQ_INSERT_HEAD(&vd->clients, vs, next);
+
if (skipauth) {
vs->auth = VNC_AUTH_NONE;
#ifdef CONFIG_VNC_TLS
@@ -2739,17 +2741,11 @@
vs->vd = vd;
-#ifdef CONFIG_VNC_WS
- if (!vs->websocket)
-#endif
- {
- vnc_init_state(vs);
- }
-}
+ if (vs->vd->lock_key_sync)
+ vs->led = qemu_add_led_event_handler(kbd_leds, vs);
-void vnc_init_state(VncState *vs)
-{
- VncDisplay *vd = vs->vd;
+ vs->mouse_mode_notifier.notify = check_pointer_type_change;
+ qemu_add_mouse_mode_change_notifier(&vs->mouse_mode_notifier);
vs->ds = vd->ds;
vs->last_x = -1;
@@ -2763,21 +2759,26 @@
qemu_mutex_init(&vs->output_mutex);
vs->bh = qemu_bh_new(vnc_jobs_bh, vs);
- QTAILQ_INSERT_HEAD(&vd->clients, vs, next);
+ vnc_init_timer(vd);
+#ifdef CONFIG_VNC_WS
+ if (!vs->websocket)
+#endif
+ {
+ vnc_init_state(vs);
+ }
+}
+
+void vnc_init_state(VncState *vs)
+{
+ VncDisplay *vd = vs->vd;
+
vga_hw_update();
vnc_write(vs, "RFB 003.008\n", 12);
vnc_flush(vs);
vnc_read_when(vs, protocol_version, 12);
reset_keys(vs);
- if (vs->vd->lock_key_sync)
- vs->led = qemu_add_led_event_handler(kbd_leds, vs);
-
- vs->mouse_mode_notifier.notify = check_pointer_type_change;
- qemu_add_mouse_mode_change_notifier(&vs->mouse_mode_notifier);
-
- vnc_init_timer(vd);
/* vs might be free()ed here */
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment