* [PATCH v2] ui/vnc: fix handling of VNC_FEATURE_XVP
@ 2023-09-25 16:05 Paolo Bonzini
2023-09-25 16:07 ` Daniel P. Berrangé
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2023-09-25 16:05 UTC (permalink / raw)
To: qemu-devel; +Cc: berrange
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] ui/vnc: fix handling of VNC_FEATURE_XVP
2023-09-25 16:05 [PATCH v2] ui/vnc: fix handling of VNC_FEATURE_XVP Paolo Bonzini
@ 2023-09-25 16:07 ` Daniel P. Berrangé
0 siblings, 0 replies; 2+ messages in thread
From: Daniel P. Berrangé @ 2023-09-25 16:07 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
On Mon, Sep 25, 2023 at 06:05:06PM +0200, Paolo Bonzini wrote:
> 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(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-25 16:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-25 16:05 [PATCH v2] ui/vnc: fix handling of VNC_FEATURE_XVP Paolo Bonzini
2023-09-25 16:07 ` Daniel P. Berrangé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).