[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 07/19] ui/vnc: fix handling of VNC_FEATURE_XVP
From: |
Paolo Bonzini |
Subject: |
[PULL 07/19] ui/vnc: fix handling of VNC_FEATURE_XVP |
Date: |
Tue, 26 Sep 2023 18:59:03 +0200 |
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>
---
ui/vnc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/vnc.c b/ui/vnc.c
index 1684ab90968..c302bb07a5b 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2205,7 +2205,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;
@@ -2454,7 +2454,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
- [PULL 00/19] Misc patches for 2023-09-26, Paolo Bonzini, 2023/09/26
- [PULL 01/19] pc_piix: remove pc-i440fx-1.4 up to pc-i440fx-1.7, Paolo Bonzini, 2023/09/26
- [PULL 03/19] user-exec-stub: remove unused variable, Paolo Bonzini, 2023/09/26
- [PULL 04/19] hw/scsi/scsi-disk: Disallow block sizes smaller than 512 [CVE-2023-42467], Paolo Bonzini, 2023/09/26
- [PULL 07/19] ui/vnc: fix handling of VNC_FEATURE_XVP,
Paolo Bonzini <=
- [PULL 06/19] ui/vnc: fix debug output for invalid audio message, Paolo Bonzini, 2023/09/26
- [PULL 12/19] target/i386/cpu: avoid shadowed local variables, Paolo Bonzini, 2023/09/26
- [PULL 08/19] mptsas: avoid shadowed local variables, Paolo Bonzini, 2023/09/26
- [PULL 10/19] m48t59-test: avoid possible overflow on ABS, Paolo Bonzini, 2023/09/26
- [PULL 17/19] block: mark mixed functions that can suspend, Paolo Bonzini, 2023/09/26
- [PULL 14/19] target/i386/seg_helper: introduce tss_set_busy, Paolo Bonzini, 2023/09/26
- [PULL 02/19] seabios: remove PCI drivers from bios.bin, Paolo Bonzini, 2023/09/26
- [PULL 15/19] target/i386/seg_helper: remove shadowed variable, Paolo Bonzini, 2023/09/26
- [PULL 05/19] vl: remove shadowed local variables, Paolo Bonzini, 2023/09/26
- [PULL 13/19] target/i386/translate: avoid shadowed local variables, Paolo Bonzini, 2023/09/26