* [PATCH] ui/vnc: fix enabling of VNC_FEATURE_XVP
@ 2023-09-25 14:50 Paolo Bonzini
0 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2023-09-25 14:50 UTC (permalink / raw)
To: qemu-devel; +Cc: berange
VNC_FEATURE_XVP was not shifted left before adding it to vs->features,
so it was never enabled.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
ui/vnc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/vnc.c b/ui/vnc.c
index 6fd86996a54..3d13757b72b 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;
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] ui/vnc: fix enabling of VNC_FEATURE_XVP
@ 2023-09-25 14:50 Paolo Bonzini
2023-09-25 15:43 ` Daniel P. Berrangé
0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2023-09-25 14:50 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.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
ui/vnc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/vnc.c b/ui/vnc.c
index 6fd86996a54..3d13757b72b 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;
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ui/vnc: fix enabling of VNC_FEATURE_XVP
2023-09-25 14:50 [PATCH] ui/vnc: fix enabling of VNC_FEATURE_XVP Paolo Bonzini
@ 2023-09-25 15:43 ` Daniel P. Berrangé
2023-09-25 15:58 ` Paolo Bonzini
0 siblings, 1 reply; 4+ messages in thread
From: Daniel P. Berrangé @ 2023-09-25 15:43 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
On Mon, Sep 25, 2023 at 04:50:34PM +0200, Paolo Bonzini wrote:
> VNC_FEATURE_XVP was not shifted left before adding it to vs->features,
> so it was never enabled.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> ui/vnc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
/facepalm
I definitely tested this code, because I had to use QEMU to
validate the GTK-VNC client implementation....
>
> diff --git a/ui/vnc.c b/ui/vnc.c
> index 6fd86996a54..3d13757b72b 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;
....I made the same screwup when processing messages:
case VNC_MSG_CLIENT_XVP:
if (!(vs->features & VNC_FEATURE_XVP)) {
error_report("vnc: xvp client message while disabled");
vnc_client_error(vs);
break;
}
so the bugs (kinda) cancelled out. So you'll need to fix
both places
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] 4+ messages in thread
* Re: [PATCH] ui/vnc: fix enabling of VNC_FEATURE_XVP
2023-09-25 15:43 ` Daniel P. Berrangé
@ 2023-09-25 15:58 ` Paolo Bonzini
0 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2023-09-25 15:58 UTC (permalink / raw)
To: Daniel P. Berrangé; +Cc: qemu-devel
On 9/25/23 17:43, Daniel P. Berrangé wrote:
> On Mon, Sep 25, 2023 at 04:50:34PM +0200, Paolo Bonzini wrote:
>> VNC_FEATURE_XVP was not shifted left before adding it to vs->features,
>> so it was never enabled.
>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>> ui/vnc.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> /facepalm
>
> I definitely tested this code, because I had to use QEMU to
> validate the GTK-VNC client implementation....
>
>
>>
>> diff --git a/ui/vnc.c b/ui/vnc.c
>> index 6fd86996a54..3d13757b72b 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;
>
> ....I made the same screwup when processing messages:
>
>
> case VNC_MSG_CLIENT_XVP:
> if (!(vs->features & VNC_FEATURE_XVP)) {
> error_report("vnc: xvp client message while disabled");
> vnc_client_error(vs);
> break;
> }
>
> so the bugs (kinda) cancelled out. So you'll need to fix
> both places
Doh, I "assumed" it was a thinko coming from usage of vnc_has_feature
elsewhere. I will send v2.
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-09-25 15:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-25 14:50 [PATCH] ui/vnc: fix enabling of VNC_FEATURE_XVP Paolo Bonzini
2023-09-25 15:43 ` Daniel P. Berrangé
2023-09-25 15:58 ` Paolo Bonzini
-- strict thread matches above, loose matches on Subject: below --
2023-09-25 14:50 Paolo Bonzini
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).