43 lines
1.6 KiB
Diff
43 lines
1.6 KiB
Diff
|
|
From e6a8d11ec3fed5127626b0ed41546373ca84bf16 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Zhang Jiao <zhangjiao2_yewu@cmss.chinamobile.com>
|
||
|
|
Date: Wed, 23 Oct 2024 09:36:06 +0800
|
||
|
|
Subject: [PATCH] ui/vnc: fix handling of VNC_FEATURE_XVP
|
||
|
|
|
||
|
|
cheery-pick from 477b301000d665313217f65e3a368d2cb7769c42
|
||
|
|
|
||
|
|
VNC_FEATURE_XVP was not shifted left before adding it to vs->features,
|
||
|
|
so it was never enabled; but it was also checked the wrong way with
|
||
|
|
a logical AND instead of vnc_has_feature. Fix both places.
|
||
|
|
|
||
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
||
|
|
Signed-off-by: Zhang Jiao <zhangjiao2_yewu@cmss.chinamobile.com>
|
||
|
|
---
|
||
|
|
ui/vnc.c | 4 ++--
|
||
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/ui/vnc.c b/ui/vnc.c
|
||
|
|
index 667db3b990..c72de81053 100644
|
||
|
|
--- a/ui/vnc.c
|
||
|
|
+++ b/ui/vnc.c
|
||
|
|
@@ -2221,7 +2221,7 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings)
|
||
|
|
break;
|
||
|
|
case VNC_ENCODING_XVP:
|
||
|
|
if (vs->vd->power_control) {
|
||
|
|
- vs->features |= VNC_FEATURE_XVP;
|
||
|
|
+ vs->features |= VNC_FEATURE_XVP_MASK;
|
||
|
|
send_xvp_message(vs, VNC_XVP_CODE_INIT);
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
@@ -2475,7 +2475,7 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len)
|
||
|
|
vnc_client_cut_text(vs, read_u32(data, 4), data + 8);
|
||
|
|
break;
|
||
|
|
case VNC_MSG_CLIENT_XVP:
|
||
|
|
- if (!(vs->features & VNC_FEATURE_XVP)) {
|
||
|
|
+ if (!vnc_has_feature(vs, VNC_FEATURE_XVP)) {
|
||
|
|
error_report("vnc: xvp client message while disabled");
|
||
|
|
vnc_client_error(vs);
|
||
|
|
break;
|
||
|
|
--
|
||
|
|
2.41.0.windows.1
|
||
|
|
|