summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2013-06-25 13:50:05 -0400
committerYonit Halperin <yhalperi@redhat.com>2013-06-25 14:13:13 -0400
commitb83c0fbf7f2eea9c66933bf51554778872f98174 (patch)
treea2b343846a7665a139fc2c66413559ba80ea1cce /server
parent648117544f3bc7f9749412be9e22834a98678d31 (diff)
downloadspice-b83c0fbf7f2eea9c66933bf51554778872f98174.tar.gz
spice-b83c0fbf7f2eea9c66933bf51554778872f98174.tar.xz
spice-b83c0fbf7f2eea9c66933bf51554778872f98174.zip
red_worker: fix for stuck display_channel over WAN (jpeg_enabled=true)
The image descriptor flags shouldn't be copied as is from the flags that were set by the driver. Specifically, the CACHE_ME flag shouldn't be copied, since it is possible that (a) the image won't be cached (b) the image is already cached, but in its lossy version, and we may want to set the bit for CACHE_REPLACE_ME, in order to cache it in its lossless version. In case (b), the client first looks for the CACHE_ME flag, and only if it is not set it looks for CACHE_REPLACE_ME (see canvas_base.c). Since both flags where set, the client ignored REPLACE_ME, and didn't turned off the lossy flag of the cach item. Then, when a request from this lossles item reached the client (FROM_CACHE_LOSSLESS), the client display channel waited endlessly for the lossless version of the image.
Diffstat (limited to 'server')
-rw-r--r--server/red_worker.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/red_worker.c b/server/red_worker.c
index 5b9f387f..825bca0f 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -6789,6 +6789,10 @@ static FillBitsType fill_bits(DisplayChannelClient *dcc, SpiceMarshaller *m,
}
image.descriptor = simage->descriptor;
+ image.descriptor.flags = 0;
+ if (simage->descriptor.flags & SPICE_IMAGE_FLAGS_HIGH_BITS_SET) {
+ image.descriptor.flags = SPICE_IMAGE_FLAGS_HIGH_BITS_SET;
+ }
if ((simage->descriptor.flags & SPICE_IMAGE_FLAGS_CACHE_ME)) {
int lossy_cache_item;