aboutsummaryrefslogtreecommitdiff
path: root/vnc.c
diff options
context:
space:
mode:
authorCorentin Chary <corentincj@iksaif.net>2010-05-19 09:24:01 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2010-06-01 12:53:09 -0500
commita9f20d31a8332ea4d6a0c90b9731f11a51cff6db (patch)
tree3888e8cb5e9559c48c8da0bf4ca04f4651e00bf9 /vnc.c
parent9af9b330c5e77024efdc5698ee38ed8ef246337b (diff)
Revert "vnc: set the right prefered encoding"
This patch was wrong, because the loop was already reversed, so the first encoding was correctly set at the end of the loopp. This reverts commit 14eb8b6829ad9dee7035de729e083844a425f274. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vnc.c')
-rw-r--r--vnc.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/vnc.c b/vnc.c
index 11ae3e5172..1fb46bdc76 100644
--- a/vnc.c
+++ b/vnc.c
@@ -1644,7 +1644,7 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings)
vnc_zlib_init(vs);
vs->features = 0;
- vs->vnc_encoding = -1;
+ vs->vnc_encoding = 0;
vs->tight_compression = 9;
vs->tight_quality = 9;
vs->absolute = -1;
@@ -1653,24 +1653,18 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings)
enc = encodings[i];
switch (enc) {
case VNC_ENCODING_RAW:
- if (vs->vnc_encoding != -1) {
- vs->vnc_encoding = enc;
- }
+ vs->vnc_encoding = enc;
break;
case VNC_ENCODING_COPYRECT:
vs->features |= VNC_FEATURE_COPYRECT_MASK;
break;
case VNC_ENCODING_HEXTILE:
vs->features |= VNC_FEATURE_HEXTILE_MASK;
- if (vs->vnc_encoding != -1) {
- vs->vnc_encoding = enc;
- }
+ vs->vnc_encoding = enc;
break;
case VNC_ENCODING_ZLIB:
vs->features |= VNC_FEATURE_ZLIB_MASK;
- if (vs->vnc_encoding != -1) {
- vs->vnc_encoding = enc;
- }
+ vs->vnc_encoding = enc;
break;
case VNC_ENCODING_DESKTOPRESIZE:
vs->features |= VNC_FEATURE_RESIZE_MASK;