Am 24.09.2015 um 10:42 schrieb Gerd Hoffmann: > Signed-off-by: Gerd Hoffmann <kra...@redhat.com> > --- > ui/vnc-jobs.c | 10 +++------- > 1 file changed, 3 insertions(+), 7 deletions(-) > > diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c > index 50e6b37..dfc5139 100644 > --- a/ui/vnc-jobs.c > +++ b/ui/vnc-jobs.c > @@ -165,8 +165,7 @@ void vnc_jobs_consume_buffer(VncState *vs) > > vnc_lock_output(vs); > if (vs->jobs_buffer.offset) { > - vnc_write(vs, vs->jobs_buffer.buffer, vs->jobs_buffer.offset); > - qio_buffer_reset(&vs->jobs_buffer); > + qio_buffer_move(&vs->output, &vs->jobs_buffer);
vnc_write restores the output handler. you need to add: diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c index dfc5139..07e0445 100644 --- a/ui/vnc-jobs.c +++ b/ui/vnc-jobs.c @@ -29,6 +29,7 @@ #include "vnc.h" #include "vnc-jobs.h" #include "qemu/sockets.h" +#include "qemu/main-loop.h" #include "block/aio.h" /* @@ -165,6 +166,9 @@ void vnc_jobs_consume_buffer(VncState *vs) vnc_lock_output(vs); if (vs->jobs_buffer.offset) { + if (qio_buffer_empty(&vs->output)) { + qemu_set_fd_handler(vs->csock, vnc_client_read, vnc_client_write, vs); + } qio_buffer_move(&vs->output, &vs->jobs_buffer); } flush = vs->csock != -1 && vs->abort != true; or you get ocasional hangs. Peter