diff options
| author | Gerd Hoffmann <kraxel@redhat.com> | 2014-07-23 11:52:02 +0200 |
|---|---|---|
| committer | Gerd Hoffmann <kraxel@redhat.com> | 2014-07-25 09:43:31 +0200 |
| commit | 6365828003c8e88bff67d351af4b66c406568a26 (patch) | |
| tree | 98be2406d6958236512816ced9d07c23f8e4646b /ui/vnc.c | |
| parent | 07535a890200e640517be0ae04fcff28860ecd37 (diff) | |
| download | focaccia-qemu-6365828003c8e88bff67d351af4b66c406568a26.tar.gz focaccia-qemu-6365828003c8e88bff67d351af4b66c406568a26.zip | |
vnc update fix
We need to remember has_updates for each vnc client. Otherwise it might happen that vnc_update_client(has_dirty=1) takes the first exit due to output buffers not being flushed yet and subsequent calls with has_dirty=0 take the second exit, wrongly assuming there is nothing to do because the work defered in the first call is ignored. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de>
Diffstat (limited to 'ui/vnc.c')
| -rw-r--r-- | ui/vnc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/vnc.c b/ui/vnc.c index 06d6ca009e..f8d9b7db95 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -887,6 +887,7 @@ static int find_and_clear_dirty_height(struct VncState *vs, static int vnc_update_client(VncState *vs, int has_dirty, bool sync) { + vs->has_dirty += has_dirty; if (vs->need_update && vs->csock != -1) { VncDisplay *vd = vs->vd; VncJob *job; @@ -898,7 +899,7 @@ static int vnc_update_client(VncState *vs, int has_dirty, bool sync) /* kernel send buffers are full -> drop frames to throttle */ return 0; - if (!has_dirty && !vs->audio_cap && !vs->force_update) + if (!vs->has_dirty && !vs->audio_cap && !vs->force_update) return 0; /* @@ -941,6 +942,7 @@ static int vnc_update_client(VncState *vs, int has_dirty, bool sync) vnc_jobs_join(vs); } vs->force_update = 0; + vs->has_dirty = 0; return n; } |