diff options
Diffstat (limited to 'main/xen/qemu-xen-websocket.patch')
-rw-r--r-- | main/xen/qemu-xen-websocket.patch | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/main/xen/qemu-xen-websocket.patch b/main/xen/qemu-xen-websocket.patch index 9d1b2e6dad..4e54d7e213 100644 --- a/main/xen/qemu-xen-websocket.patch +++ b/main/xen/qemu-xen-websocket.patch @@ -789,7 +789,7 @@ } return 0; -@@ -2944,6 +3069,30 @@ +@@ -2944,21 +3069,56 @@ vs->lsock = unix_listen(display+5, dpy+5, 256-5); } else { vs->lsock = inet_listen(display, dpy, 256, SOCK_STREAM, 5900); @@ -818,12 +818,24 @@ + } +#endif /* CONFIG_VNC_WS */ } - if (-1 == vs->lsock) { - g_free(dpy); -@@ -2954,11 +3103,20 @@ +- if (-1 == vs->lsock) { +- g_free(dpy); +- return -1; +- } else { +- g_free(vs->display); +- vs->display = dpy; ++ g_free(vs->display); ++ vs->display = dpy; ++ ++ qemu_set_fd_handler2(vs->lsock, NULL, vnc_listen_regular_read, NULL, vs); ++#ifdef CONFIG_VNC_WS ++ if (vs->websocket) { ++ qemu_set_fd_handler2(vs->lwebsock, NULL, vnc_listen_websocket_read, NULL, vs); } ++#endif } - return qemu_set_fd_handler2(vs->lsock, NULL, vnc_listen_read, NULL, vs); +- return qemu_set_fd_handler2(vs->lsock, NULL, vnc_listen_read, NULL, vs); ++ return 0; + +fail: + g_free(vs->display); |